mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
Simplify the parsing of unnamed globals. No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b20541c5fb
commit
85422f7da3
@ -257,45 +257,26 @@ bool LLParser::ParseTopLevelEntities() {
|
||||
case lltok::kw_appending: // OptionalLinkage
|
||||
case lltok::kw_common: // OptionalLinkage
|
||||
case lltok::kw_extern_weak: // OptionalLinkage
|
||||
case lltok::kw_external: { // OptionalLinkage
|
||||
case lltok::kw_external: // OptionalLinkage
|
||||
case lltok::kw_default: // OptionalVisibility
|
||||
case lltok::kw_hidden: // OptionalVisibility
|
||||
case lltok::kw_protected: // OptionalVisibility
|
||||
case lltok::kw_thread_local: // OptionalThreadLocal
|
||||
case lltok::kw_addrspace: // OptionalAddrSpace
|
||||
case lltok::kw_constant: // GlobalType
|
||||
case lltok::kw_global: { // GlobalType
|
||||
unsigned Linkage, Visibility, DLLStorageClass;
|
||||
GlobalVariable::ThreadLocalMode TLM;
|
||||
if (ParseOptionalLinkage(Linkage) ||
|
||||
bool HasLinkage;
|
||||
if (ParseOptionalLinkage(Linkage, HasLinkage) ||
|
||||
ParseOptionalVisibility(Visibility) ||
|
||||
ParseOptionalDLLStorageClass(DLLStorageClass) ||
|
||||
ParseOptionalThreadLocal(TLM) ||
|
||||
ParseGlobal("", SMLoc(), Linkage, true, Visibility, DLLStorageClass,
|
||||
TLM))
|
||||
ParseGlobal("", SMLoc(), Linkage, HasLinkage, Visibility,
|
||||
DLLStorageClass, TLM))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
case lltok::kw_default: // OptionalVisibility
|
||||
case lltok::kw_hidden: // OptionalVisibility
|
||||
case lltok::kw_protected: { // OptionalVisibility
|
||||
unsigned Visibility, DLLStorageClass;
|
||||
GlobalVariable::ThreadLocalMode TLM;
|
||||
if (ParseOptionalVisibility(Visibility) ||
|
||||
ParseOptionalDLLStorageClass(DLLStorageClass) ||
|
||||
ParseOptionalThreadLocal(TLM) ||
|
||||
ParseGlobal("", SMLoc(), 0, false, Visibility, DLLStorageClass, TLM))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
case lltok::kw_thread_local: { // OptionalThreadLocal
|
||||
GlobalVariable::ThreadLocalMode TLM;
|
||||
if (ParseOptionalThreadLocal(TLM) ||
|
||||
ParseGlobal("", SMLoc(), 0, false, 0, 0, TLM))
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
|
||||
case lltok::kw_addrspace: // OptionalAddrSpace
|
||||
case lltok::kw_constant: // GlobalType
|
||||
case lltok::kw_global: // GlobalType
|
||||
if (ParseGlobal("", SMLoc(), 0, false, 0, 0, GlobalValue::NotThreadLocal))
|
||||
return true;
|
||||
break;
|
||||
|
||||
case lltok::kw_attributes: if (ParseUnnamedAttrGrp()) return true; break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user