summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 4bf339786d42..250946bd56dd 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1175,18 +1175,13 @@ static void AppendTargetMangling(const CodeGenModule &CGM,
}
}
-// Returns true if GD is a function/var decl with internal linkage and
+// Returns true if GD is a function decl with internal linkage and
// needs a unique suffix after the mangled name.
static bool isUniqueInternalLinkageDecl(GlobalDecl GD,
CodeGenModule &CGM) {
const Decl *D = GD.getDecl();
- if (!CGM.getModuleNameHash().empty() &&
- ((isa<FunctionDecl>(D) &&
- CGM.getFunctionLinkage(GD) == llvm::GlobalValue::InternalLinkage) ||
- (isa<VarDecl>(D) && CGM.getContext().GetGVALinkageForVariable(
- cast<VarDecl>(D)) == GVA_Internal)))
- return true;
- return false;
+ return !CGM.getModuleNameHash().empty() && isa<FunctionDecl>(D) &&
+ (CGM.getFunctionLinkage(GD) == llvm::GlobalValue::InternalLinkage);
}
static std::string getMangledNameImpl(CodeGenModule &CGM, GlobalDecl GD,