Skip to content

Commit

Permalink
- fixes to support ExternalMediaLibrary better.
Browse files Browse the repository at this point in the history
- fixes to SCode dependency to not remove package constants that appear in external function declaration
  some external functions do not have any annotation but they do have external arguments in external "C":
  Example:
      replaceable function getCriticalPressure 
        output AbsolutePressure pc;
        external "C" pc = TwoPhaseMedium_getCriticalPressure_(mediumName, libraryName, substanceName);
      end getCriticalPressure;

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15895 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Apr 23, 2013
1 parent cd36f90 commit 1ab0e77
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Compiler/FrontEnd/NFSCodeDependency.mo
Expand Up @@ -1245,7 +1245,14 @@ algorithm
SCode.Annotation ann;
list<Absyn.Exp> args;

// An external declaration might have an annotation that we need to analyse.
// An external declaration might have arguments that we need to analyse.
case (SOME(SCode.EXTERNALDECL(args = args, annotation_ = NONE())), _, _)
equation
List.map2_0(args, analyseExp, inEnv, inInfo);
then
();

// An external declaration might have arguments and an annotation that we need to analyse.
case (SOME(SCode.EXTERNALDECL(args = args, annotation_ = SOME(ann))), _, _)
equation
List.map2_0(args, analyseExp, inEnv, inInfo);
Expand Down

0 comments on commit 1ab0e77

Please sign in to comment.