diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-15 08:15:00 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-15 08:15:00 +0000 |
commit | ba7c38c36adb65d66c129270b2813fd2167488ed (patch) | |
tree | 82995351f44cc9d463dfde26aa790d4ba1359401 /lib/AsmParser | |
parent | 6ccb5ef1b504e71b63219437f5bcf4856207949b (diff) | |
download | external_llvm-ba7c38c36adb65d66c129270b2813fd2167488ed.zip external_llvm-ba7c38c36adb65d66c129270b2813fd2167488ed.tar.gz external_llvm-ba7c38c36adb65d66c129270b2813fd2167488ed.tar.bz2 |
Allow unnamed_addr on declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index f0fb310..04e2e60 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -716,9 +716,6 @@ bool LLParser::ParseGlobal(const std::string &Name, LocTy NameLoc, return true; } - if (!Init && UnnamedAddr) - return Error(UnnamedAddrLoc, "only definitions can have unnamed_addr"); - if (Ty->isFunctionTy() || Ty->isLabelTy()) return Error(TyLoc, "invalid type for global variable"); @@ -2687,9 +2684,6 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { ParseType(RetType, RetTypeLoc, true /*void allowed*/)) return true; - if (!isDefine && UnnamedAddr) - return Error(UnnamedAddrLoc, "only definitions can have unnamed_addr"); - // Verify that the linkage is ok. switch ((GlobalValue::LinkageTypes)Linkage) { case GlobalValue::ExternalLinkage: |