summaryrefslogtreecommitdiff
path: root/tools/llvm-mc/llvm-mc.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-13 02:20:57 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-13 02:20:57 +0000
commit5e6a7a248b980dd2a98a3613c72b75ba9d01d162 (patch)
treefa30e3a3a50b3d83eae37a36c7b0882f9c94eed2 /tools/llvm-mc/llvm-mc.cpp
parent181ab6a854162da908310e23714b43b0091c9094 (diff)
downloadllvm-5e6a7a248b980dd2a98a3613c72b75ba9d01d162.tar.gz
llvm-5e6a7a248b980dd2a98a3613c72b75ba9d01d162.tar.bz2
llvm-5e6a7a248b980dd2a98a3613c72b75ba9d01d162.tar.xz
llvm-mc: Support -n, useful for comparing -integrated-as output since the
compiler may not lead with the text section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98418 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 48e0d3d6b5..666f0babf3 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -84,6 +84,10 @@ static cl::opt<std::string>
TripleName("triple", cl::desc("Target triple to assemble for, "
"see -version for available targets"));
+static cl::opt<bool>
+NoInitialTextSection("n", cl::desc(
+ "Don't assume assembly file starts in the text section"));
+
enum ActionType {
AC_AsLex,
AC_Assemble,
@@ -303,7 +307,7 @@ static int AssembleInput(const char *ProgName) {
Parser.setTargetParser(*TAP.get());
- int Res = Parser.Run();
+ int Res = Parser.Run(NoInitialTextSection);
if (Out != &fouts())
delete Out;