summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser/MIParser.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-12 21:27:16 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-12 21:27:16 +0000
commit2791dcca605496da8b56fa1d625f165fc9cdc7e8 (patch)
tree29d4b3b0d91158f3cb9f06f0beef1bae0b87f677 /llvm/lib/CodeGen/MIRParser/MIParser.cpp
parent0cc671bf794d0cdf04cae30873b7f84ac14c6cff (diff)
downloadbcm5719-llvm-2791dcca605496da8b56fa1d625f165fc9cdc7e8.tar.gz
bcm5719-llvm-2791dcca605496da8b56fa1d625f165fc9cdc7e8.zip
MIR Parser: Allow the MI IR references to reference global values.
This commit fixes a bug where MI parser couldn't resolve the named IR references that referenced named global values. llvm-svn: 244817
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIParser.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index b6c39399471..b333f0b52b1 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -1086,6 +1086,9 @@ bool MIParser::parseIRValue(Value *&V) {
case MIToken::NamedIRValue: {
V = MF.getFunction()->getValueSymbolTable().lookup(Token.stringValue());
if (!V)
+ V = MF.getFunction()->getParent()->getValueSymbolTable().lookup(
+ Token.stringValue());
+ if (!V)
return error(Twine("use of undefined IR value '") + Token.range() + "'");
break;
}
OpenPOWER on IntegriCloud