summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-04-27 01:07:52 +0000
committerEric Christopher <echristo@gmail.com>2013-04-27 01:07:52 +0000
commit00297bad0d7458b5bcdfce3d3301957b0539b070 (patch)
tree6959b868dc527f694058576650d8f0e6a73c589e /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent85c16ef612c48e3fce1d75d9c046edc69cb46091 (diff)
downloadllvm-00297bad0d7458b5bcdfce3d3301957b0539b070.tar.gz
llvm-00297bad0d7458b5bcdfce3d3301957b0539b070.tar.bz2
llvm-00297bad0d7458b5bcdfce3d3301957b0539b070.tar.xz
Use the target triple from the target machine rather than the module
to determine whether or not we're on a darwin platform for debug code emitting. Solves the problem of a module with no triple on the command line and no triple in the module using non-gdb ok features on darwin. Fix up the member-pointers test to check the correct things for cross platform (DW_FORM_flag is a good prefix). Unfortunately no testcase because I have no ideas how to test something without a triple and without a triple in the module yet check precisely on two platforms. Ideas welcome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 864787d32f..84162ace41 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -133,6 +133,10 @@ const DataLayout &AsmPrinter::getDataLayout() const {
return *TM.getDataLayout();
}
+StringRef AsmPrinter::getTargetTriple() const {
+ return TM.getTargetTriple();
+}
+
/// getCurrentSection() - Return the current section we are emitting to.
const MCSection *AsmPrinter::getCurrentSection() const {
return OutStreamer.getCurrentSection().first;