Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: src/IceTargetLoweringX8632.cpp

Issue 469973002: Emit .local before .comm to make llvm-mc happy. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/convert.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX8632.cpp
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp
index a78e21a86cc4801c1e764b5c03939a17ce91a51e..75ea25d25b7375babc2512882f62af4a38c9a91e 100644
--- a/src/IceTargetLoweringX8632.cpp
+++ b/src/IceTargetLoweringX8632.cpp
@@ -4207,8 +4207,8 @@ void TargetGlobalInitX8632::lower(const IceString &Name, SizeT Align,
// zeroinitializer (non-constant):
// (.section or .data as above)
- // .comm NAME, SIZE, ALIGN
// .local NAME
+ // .comm NAME, SIZE, ALIGN
IceString MangledName = Ctx->mangleName(Name);
// Start a new section.
@@ -4218,6 +4218,8 @@ void TargetGlobalInitX8632::lower(const IceString &Name, SizeT Align,
Str << "\t.type\t" << MangledName << ",@object\n";
Str << "\t.data\n";
}
+ Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName
+ << "\n";
if (IsZeroInitializer) {
if (IsConst) {
Str << "\t.align\t" << Align << "\n";
@@ -4238,8 +4240,6 @@ void TargetGlobalInitX8632::lower(const IceString &Name, SizeT Align,
}
Str << "\t.size\t" << MangledName << ", " << Size << "\n";
}
- Str << "\t" << (IsInternal ? ".local" : ".global") << "\t" << MangledName
- << "\n";
}
} // end of namespace Ice
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/convert.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698