summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKLexicalContext-MLKLLVMCompilation.mm2
-rw-r--r--MLKLexicalContext.m3
2 files changed, 3 insertions, 2 deletions
diff --git a/MLKLexicalContext-MLKLLVMCompilation.mm b/MLKLexicalContext-MLKLLVMCompilation.mm
index 4285d1e..5a279e5 100644
--- a/MLKLexicalContext-MLKLLVMCompilation.mm
+++ b/MLKLexicalContext-MLKLLVMCompilation.mm
@@ -50,7 +50,7 @@ id MLKDummyUseLLVMLexicalContext = nil;
if (flag)
return [flag boolValue];
else
- return (![self contextForVariable:name] || [self variableIsGlobal:name]);
+ return [self variableIsGlobal:name];
}
-(Instruction *) functionCellValueForSymbol:(id)name
diff --git a/MLKLexicalContext.m b/MLKLexicalContext.m
index 5456aa3..acb5b4e 100644
--- a/MLKLexicalContext.m
+++ b/MLKLexicalContext.m
@@ -293,7 +293,8 @@ static MLKLexicalContext *global_context;
-(BOOL) variableIsGlobal:(id)name
{
- return [self contextForVariable:name] == [MLKLexicalContext globalContext];
+ return (![self contextForVariable:name]
+ || [self contextForVariable:name] == [MLKLexicalContext globalContext]);
}
-(BOOL) functionIsInline:(MLKSymbol *)symbol