From d1a919e1396ce4bc424f4f24bb69d79a2afd7ea0 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 3 Aug 2009 17:40:25 +0000 Subject: [PATCH] Change C, CBE, MSIL to not provide target data via getTargetData(). - The theory is these should never actually be called, since these boil down to passes which can access the target data via the standard mechanism. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77975 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CTargetMachine.h | 2 +- lib/Target/CppBackend/CPPTargetMachine.h | 2 +- lib/Target/MSIL/MSILWriter.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Target/CBackend/CTargetMachine.h b/lib/Target/CBackend/CTargetMachine.h index 72146a80cb9..ffd033f1980 100644 --- a/lib/Target/CBackend/CTargetMachine.h +++ b/lib/Target/CBackend/CTargetMachine.h @@ -32,7 +32,7 @@ struct CTargetMachine : public TargetMachine { CodeGenFileType FileType, CodeGenOpt::Level OptLevel); - virtual const TargetData *getTargetData() const { return &DataLayout; } + virtual const TargetData *getTargetData() const { return 0; } }; extern Target TheCBackendTarget; diff --git a/lib/Target/CppBackend/CPPTargetMachine.h b/lib/Target/CppBackend/CPPTargetMachine.h index c7c8a7e04a4..c838b389b97 100644 --- a/lib/Target/CppBackend/CPPTargetMachine.h +++ b/lib/Target/CppBackend/CPPTargetMachine.h @@ -34,7 +34,7 @@ struct CPPTargetMachine : public TargetMachine { CodeGenFileType FileType, CodeGenOpt::Level OptLevel); - virtual const TargetData *getTargetData() const { return &DataLayout; } + virtual const TargetData *getTargetData() const { return 0; } }; extern Target TheCppBackendTarget; diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp index fa47a8f1135..873f9b7125b 100644 --- a/lib/Target/MSIL/MSILWriter.cpp +++ b/lib/Target/MSIL/MSILWriter.cpp @@ -42,7 +42,7 @@ namespace llvm { CodeGenFileType FileType, CodeGenOpt::Level OptLevel); - virtual const TargetData *getTargetData() const { return &DataLayout; } + virtual const TargetData *getTargetData() const { return 0; } }; } -- 2.34.1