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

Unified Diff: src/IceCfg.cpp

Issue 455633002: Subzero: Add the "llvm2ice -ffunction-sections" argument. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Rebase 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 | src/IceClFlags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index 3e32d755219d4600b5803a0cba1df05518d24a90..49e98067fba9305e219e8a12ea2b1fadb8878095 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -14,6 +14,7 @@
#include "IceCfg.h"
#include "IceCfgNode.h"
+#include "IceClFlags.h"
#include "IceDefs.h"
#include "IceInst.h"
#include "IceLiveness.h"
@@ -300,8 +301,10 @@ void Cfg::emit() {
<< "\n\n";
}
Str << "\t.text\n";
+ IceString MangledName = getContext()->mangleName(getFunctionName());
+ if (Ctx->getFlags().FunctionSections)
+ Str << "\t.section\t.text." << MangledName << "\n";
if (!getInternal()) {
- IceString MangledName = getContext()->mangleName(getFunctionName());
Str << "\t.globl\t" << MangledName << "\n";
Str << "\t.type\t" << MangledName << ",@function\n";
}
« no previous file with comments | « no previous file | src/IceClFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698