aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfWriter.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 6627543a85..5b665a0c22 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -139,7 +139,7 @@ void AsmPrinter::getAnalysisUsage(AnalysisUsage &AU) const {
}
bool AsmPrinter::doInitialization(Module &M) {
- Mang = new Mangler(M, TAI->getGlobalPrefix());
+ Mang = new Mangler(M, TAI->getGlobalPrefix(), TAI->getPrivateGlobalPrefix());
GCModuleInfo *MI = getAnalysisToUpdate<GCModuleInfo>();
assert(MI && "AsmPrinter didn't require GCModuleInfo?");
@@ -199,7 +199,7 @@ bool AsmPrinter::doFinalization(Module &M) {
O << "\t.globl\t" << Name << '\n';
else if (I->hasWeakLinkage())
O << TAI->getWeakRefDirective() << Name << '\n';
- else if (!I->hasInternalLinkage())
+ else if (!I->hasLocalLinkage())
assert(0 && "Invalid alias linkage");
printVisibility(Name, I->getVisibility());
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 09d169b6f3..02f27d181a 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -3272,7 +3272,8 @@ private:
// Externally visible entry into the functions eh frame info.
// If the corresponding function is static, this should not be
// externally visible.
- if (linkage != Function::InternalLinkage) {
+ if (linkage != Function::InternalLinkage &&
+ linkage != Function::PrivateLinkage) {
if (const char *GlobalEHDirective = TAI->getGlobalEHDirective())
O << GlobalEHDirective << EHFrameInfo.FnName << "\n";
}