summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-17 17:53:31 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-17 17:53:31 +0000
commit54fc298bbc2e0a99800e86ec9464d92a7b8f6337 (patch)
tree91b8b95cbf2797151952c7026619e723e6f6b9c1 /llvm/lib/AsmParser
parent3df5dd4de79daab1da83119430f8396af783fd1f (diff)
downloadbcm5719-llvm-54fc298bbc2e0a99800e86ec9464d92a7b8f6337.tar.gz
bcm5719-llvm-54fc298bbc2e0a99800e86ec9464d92a7b8f6337.zip
Allow aliases to be unnamed.
If globals can be unnamed, there is no reason for aliases to be different. The restriction was there since the original implementation in r36435. I can only guess it was there because of the old bison parser for the old alias syntax. llvm-svn: 239921
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 0b6740dba3b..064b74304a9 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -670,6 +670,9 @@ bool LLParser::ParseAlias(const std::string &Name, LocTy NameLoc, unsigned L,
GA->setDLLStorageClass((GlobalValue::DLLStorageClassTypes)DLLStorageClass);
GA->setUnnamedAddr(UnnamedAddr);
+ if (Name.empty())
+ NumberedVals.push_back(GA.get());
+
// See if this value already exists in the symbol table. If so, it is either
// a redefinition or a definition of a forward reference.
if (GlobalValue *Val = M->getNamedValue(Name)) {
OpenPOWER on IntegriCloud