aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2016-07-27 19:57:40 +0000
committerNirav Dave <niravd@google.com>2016-07-27 19:57:40 +0000
commit993a1398473ecf3e5deb62350aac4356d061e99f (patch)
tree564b67899560d1d55b9c877efccfd49f1a192cfe /clang/lib/CodeGen/BackendUtil.cpp
parentee1174865000a09ca1fab2100a42c3462771d1d6 (diff)
downloadllvm-993a1398473ecf3e5deb62350aac4356d061e99f.zip
llvm-993a1398473ecf3e5deb62350aac4356d061e99f.tar.gz
llvm-993a1398473ecf3e5deb62350aac4356d061e99f.tar.bz2
Add flags to toggle preservation of assembly comments
Summary: Add -fpreserve-as-comments and -fno-preserve-as-comments. Reviewers: echristo, rnk Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D22883 llvm-svn: 276907
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 282468f..e5d4930 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -604,6 +604,7 @@ void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
CodeGenOpts.IncrementalLinkerCompatible;
Options.MCOptions.MCFatalWarnings = CodeGenOpts.FatalWarnings;
Options.MCOptions.AsmVerbose = CodeGenOpts.AsmVerbose;
+ Options.MCOptions.PreserveAsmComments = CodeGenOpts.PreserveAsmComments;
Options.MCOptions.ABIName = TargetOpts.ABI;
TM.reset(TheTarget->createTargetMachine(Triple, TargetOpts.CPU, FeaturesStr,