r265702 - Basic: move CodeGenOptions from Frontend
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 7 10:49:45 PDT 2016
Author: compnerd
Date: Thu Apr 7 12:49:44 2016
New Revision: 265702
URL: http://llvm.org/viewvc/llvm-project?rev=265702&view=rev
Log:
Basic: move CodeGenOptions from Frontend
This is a mechanical move of CodeGenOptions from libFrontend to libBasic. This
fixes the layering violation introduced earlier by threading CodeGenOptions into
TargetInfo. It should also fix the modules based self-hosting builds. NFC.
Added:
cfe/trunk/include/clang/Basic/CodeGenOptions.def
- copied, changed from r265700, cfe/trunk/include/clang/Frontend/CodeGenOptions.def
cfe/trunk/include/clang/Basic/CodeGenOptions.h
- copied, changed from r265700, cfe/trunk/include/clang/Frontend/CodeGenOptions.h
cfe/trunk/lib/Basic/CodeGenOptions.cpp
- copied, changed from r265700, cfe/trunk/lib/Frontend/CodeGenOptions.cpp
Removed:
cfe/trunk/include/clang/Frontend/CodeGenOptions.def
cfe/trunk/include/clang/Frontend/CodeGenOptions.h
cfe/trunk/lib/Frontend/CodeGenOptions.cpp
Modified:
cfe/trunk/include/clang/Basic/TargetInfo.h
cfe/trunk/include/clang/Frontend/CompilerInvocation.h
cfe/trunk/include/clang/module.modulemap
cfe/trunk/lib/Basic/CMakeLists.txt
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/CodeGen/BackendUtil.cpp
cfe/trunk/lib/CodeGen/CGCXX.cpp
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/lib/CodeGen/CGClass.cpp
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CGDebugInfo.h
cfe/trunk/lib/CodeGen/CGDecl.cpp
cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/lib/CodeGen/CGExprCXX.cpp
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
cfe/trunk/lib/CodeGen/CGVTables.cpp
cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/CodeGenPGO.h
cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
cfe/trunk/lib/CodeGen/CoverageMappingGen.h
cfe/trunk/lib/CodeGen/ModuleBuilder.cpp
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
cfe/trunk/lib/CodeGen/TargetInfo.cpp
cfe/trunk/lib/Frontend/CMakeLists.txt
cfe/trunk/unittests/Basic/CMakeLists.txt
cfe/trunk/unittests/Lex/CMakeLists.txt
Copied: cfe/trunk/include/clang/Basic/CodeGenOptions.def (from r265700, cfe/trunk/include/clang/Frontend/CodeGenOptions.def)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/CodeGenOptions.def?p2=cfe/trunk/include/clang/Basic/CodeGenOptions.def&p1=cfe/trunk/include/clang/Frontend/CodeGenOptions.def&r1=265700&r2=265702&rev=265702&view=diff
==============================================================================
(empty)
Copied: cfe/trunk/include/clang/Basic/CodeGenOptions.h (from r265700, cfe/trunk/include/clang/Frontend/CodeGenOptions.h)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/CodeGenOptions.h?p2=cfe/trunk/include/clang/Basic/CodeGenOptions.h&p1=cfe/trunk/include/clang/Frontend/CodeGenOptions.h&r1=265700&r2=265702&rev=265702&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.h (original)
+++ cfe/trunk/include/clang/Basic/CodeGenOptions.h Thu Apr 7 12:49:44 2016
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_FRONTEND_CODEGENOPTIONS_H
-#define LLVM_CLANG_FRONTEND_CODEGENOPTIONS_H
+#ifndef LLVM_CLANG_BASIC_CODEGENOPTIONS_H
+#define LLVM_CLANG_BASIC_CODEGENOPTIONS_H
#include "clang/Basic/DebugInfoOptions.h"
#include "clang/Basic/Sanitizers.h"
#include "llvm/Support/Regex.h"
#include "llvm/Target/TargetOptions.h"
+
#include <map>
#include <memory>
#include <string>
@@ -31,12 +32,12 @@ class CodeGenOptionsBase {
public:
#define CODEGENOPT(Name, Bits, Default) unsigned Name : Bits;
#define ENUM_CODEGENOPT(Name, Type, Bits, Default)
-#include "clang/Frontend/CodeGenOptions.def"
+#include "clang/Basic/CodeGenOptions.def"
protected:
#define CODEGENOPT(Name, Bits, Default)
#define ENUM_CODEGENOPT(Name, Type, Bits, Default) unsigned Name : Bits;
-#include "clang/Frontend/CodeGenOptions.def"
+#include "clang/Basic/CodeGenOptions.def"
};
/// CodeGenOptions - Track various options which control how the code
@@ -211,7 +212,7 @@ public:
#define ENUM_CODEGENOPT(Name, Type, Bits, Default) \
Type get##Name() const { return static_cast<Type>(Name); } \
void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
-#include "clang/Frontend/CodeGenOptions.def"
+#include "clang/Basic/CodeGenOptions.def"
CodeGenOptions();
Modified: cfe/trunk/include/clang/Basic/TargetInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TargetInfo.h?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TargetInfo.h (original)
+++ cfe/trunk/include/clang/Basic/TargetInfo.h Thu Apr 7 12:49:44 2016
@@ -16,12 +16,12 @@
#define LLVM_CLANG_BASIC_TARGETINFO_H
#include "clang/Basic/AddressSpaces.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TargetCXXABI.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/VersionTuple.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/SmallSet.h"
@@ -31,6 +31,7 @@
#include "llvm/ADT/Triple.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/Support/DataTypes.h"
+
#include <cassert>
#include <string>
#include <vector>
Removed: cfe/trunk/include/clang/Frontend/CodeGenOptions.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.def?rev=265701&view=auto
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.def (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.def (removed)
@@ -1,223 +0,0 @@
-//===--- CodeGenOptions.def - Code generation option database ------ C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the code generation options. Users of this file
-// must define the CODEGENOPT macro to make use of this information.
-// Optionally, the user may also define ENUM_CODEGENOPT (for options
-// that have enumeration type and VALUE_CODEGENOPT is a code
-// generation option that describes a value rather than a flag.
-//
-//===----------------------------------------------------------------------===//
-#ifndef CODEGENOPT
-# error Define the CODEGENOPT macro to handle language options
-#endif
-
-#ifndef VALUE_CODEGENOPT
-# define VALUE_CODEGENOPT(Name, Bits, Default) \
-CODEGENOPT(Name, Bits, Default)
-#endif
-
-#ifndef ENUM_CODEGENOPT
-# define ENUM_CODEGENOPT(Name, Type, Bits, Default) \
-CODEGENOPT(Name, Bits, Default)
-#endif
-
-CODEGENOPT(DisableIntegratedAS, 1, 0) ///< -no-integrated-as
-CODEGENOPT(CompressDebugSections, 1, 0) ///< -Wa,-compress-debug-sections
-CODEGENOPT(Autolink , 1, 1) ///< -fno-autolink
-CODEGENOPT(AsmVerbose , 1, 0) ///< -dA, -fverbose-asm.
-CODEGENOPT(ObjCAutoRefCountExceptions , 1, 0) ///< Whether ARC should be EH-safe.
-CODEGENOPT(CoverageExtraChecksum, 1, 0) ///< Whether we need a second checksum for functions in GCNO files.
-CODEGENOPT(CoverageNoFunctionNamesInData, 1, 0) ///< Do not include function names in GCDA files.
-CODEGENOPT(CoverageExitBlockBeforeBody, 1, 0) ///< Whether to emit the exit block before the body blocks in GCNO files.
-CODEGENOPT(CXAAtExit , 1, 1) ///< Use __cxa_atexit for calling destructors.
-CODEGENOPT(CXXCtorDtorAliases, 1, 0) ///< Emit complete ctors/dtors as linker
- ///< aliases to base ctors when possible.
-CODEGENOPT(DataSections , 1, 0) ///< Set when -fdata-sections is enabled.
-CODEGENOPT(UniqueSectionNames, 1, 1) ///< Set for -funique-section-names.
-CODEGENOPT(DisableFPElim , 1, 0) ///< Set when -fomit-frame-pointer is enabled.
-CODEGENOPT(DisableFree , 1, 0) ///< Don't free memory.
-CODEGENOPT(DiscardValueNames , 1, 0) ///< Discard Value Names from the IR (LLVMContext flag)
-CODEGENOPT(DisableGCov , 1, 0) ///< Don't run the GCov pass, for testing.
-CODEGENOPT(DisableLLVMOpts , 1, 0) ///< Don't run any optimizations, for use in
- ///< getting .bc files that correspond to the
- ///< internal state before optimizations are
- ///< done.
-CODEGENOPT(DisableLLVMPasses , 1, 0) ///< Don't run any LLVM IR passes to get
- ///< the pristine IR generated by the
- ///< frontend.
-CODEGENOPT(DisableRedZone , 1, 0) ///< Set when -mno-red-zone is enabled.
-CODEGENOPT(DisableTailCalls , 1, 0) ///< Do not emit tail calls.
-CODEGENOPT(EmitDeclMetadata , 1, 0) ///< Emit special metadata indicating what
- ///< Decl* various IR entities came from.
- ///< Only useful when running CodeGen as a
- ///< subroutine.
-CODEGENOPT(EmitGcovArcs , 1, 0) ///< Emit coverage data files, aka. GCDA.
-CODEGENOPT(EmitGcovNotes , 1, 0) ///< Emit coverage "notes" files, aka GCNO.
-CODEGENOPT(EmitOpenCLArgMetadata , 1, 0) ///< Emit OpenCL kernel arg metadata.
-CODEGENOPT(EmulatedTLS , 1, 0) ///< Set when -femulated-tls is enabled.
-/// \brief FP_CONTRACT mode (on/off/fast).
-ENUM_CODEGENOPT(FPContractMode, FPContractModeKind, 2, FPC_On)
-CODEGENOPT(ForbidGuardVariables , 1, 0) ///< Issue errors if C++ guard variables
- ///< are required.
-CODEGENOPT(FunctionSections , 1, 0) ///< Set when -ffunction-sections is enabled.
-CODEGENOPT(InstrumentFunctions , 1, 0) ///< Set when -finstrument-functions is
- ///< enabled.
-CODEGENOPT(InstrumentForProfiling , 1, 0) ///< Set when -pg is enabled.
-CODEGENOPT(LessPreciseFPMAD , 1, 0) ///< Enable less precise MAD instructions to
- ///< be generated.
-CODEGENOPT(PrepareForLTO , 1, 0) ///< Set when -flto is enabled on the
- ///< compile step.
-CODEGENOPT(EmitSummaryIndex, 1, 0) ///< Set when -flto=thin is enabled on the
- ///< compile step.
-CODEGENOPT(IncrementalLinkerCompatible, 1, 0) ///< Emit an object file which can
- ///< be used with an incremental
- ///< linker.
-CODEGENOPT(MergeAllConstants , 1, 1) ///< Merge identical constants.
-CODEGENOPT(MergeFunctions , 1, 0) ///< Set when -fmerge-functions is enabled.
-CODEGENOPT(MSVolatile , 1, 0) ///< Set when /volatile:ms is enabled.
-CODEGENOPT(NoCommon , 1, 0) ///< Set when -fno-common or C++ is enabled.
-CODEGENOPT(NoDwarfDirectoryAsm , 1, 0) ///< Set when -fno-dwarf-directory-asm is
- ///< enabled.
-CODEGENOPT(NoExecStack , 1, 0) ///< Set when -Wa,--noexecstack is enabled.
-CODEGENOPT(FatalWarnings , 1, 0) ///< Set when -Wa,--fatal-warnings is
- ///< enabled.
-CODEGENOPT(EnableSegmentedStacks , 1, 0) ///< Set when -fsplit-stack is enabled.
-CODEGENOPT(NoImplicitFloat , 1, 0) ///< Set when -mno-implicit-float is enabled.
-CODEGENOPT(NoInfsFPMath , 1, 0) ///< Assume FP arguments, results not +-Inf.
-CODEGENOPT(NoSignedZeros , 1, 0) ///< Allow ignoring the signedness of FP zero
-CODEGENOPT(ReciprocalMath , 1, 0) ///< Allow FP divisions to be reassociated.
-CODEGENOPT(NoInline , 1, 0) ///< Set when -fno-inline is enabled.
- ///< Disables use of the inline keyword.
-CODEGENOPT(NoNaNsFPMath , 1, 0) ///< Assume FP arguments, results not NaN.
-CODEGENOPT(NoZeroInitializedInBSS , 1, 0) ///< -fno-zero-initialized-in-bss.
-/// \brief Method of Objective-C dispatch to use.
-ENUM_CODEGENOPT(ObjCDispatchMethod, ObjCDispatchMethodKind, 2, Legacy)
-CODEGENOPT(OmitLeafFramePointer , 1, 0) ///< Set when -momit-leaf-frame-pointer is
- ///< enabled.
-VALUE_CODEGENOPT(OptimizationLevel, 2, 0) ///< The -O[0-3] option specified.
-VALUE_CODEGENOPT(OptimizeSize, 2, 0) ///< If -Os (==1) or -Oz (==2) is specified.
-
-/// \brief Choose profile instrumenation kind or no instrumentation.
-ENUM_CODEGENOPT(ProfileInstr, ProfileInstrKind, 2, ProfileNone)
-/// \brief Choose profile kind for PGO use compilation.
-ENUM_CODEGENOPT(ProfileUse, ProfileInstrKind, 2, ProfileNone)
-CODEGENOPT(CoverageMapping , 1, 0) ///< Generate coverage mapping regions to
- ///< enable code coverage analysis.
-CODEGENOPT(DumpCoverageMapping , 1, 0) ///< Dump the generated coverage mapping
- ///< regions.
-
- /// If -fpcc-struct-return or -freg-struct-return is specified.
-ENUM_CODEGENOPT(StructReturnConvention, StructReturnConventionKind, 2, SRCK_Default)
-
-CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions.
-CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled.
-CODEGENOPT(StructPathTBAA , 1, 0) ///< Whether or not to use struct-path TBAA.
-CODEGENOPT(SaveTempLabels , 1, 0) ///< Save temporary labels.
-CODEGENOPT(SanitizeAddressZeroBaseShadow , 1, 0) ///< Map shadow memory at zero
- ///< offset in AddressSanitizer.
-CODEGENOPT(SanitizeMemoryTrackOrigins, 2, 0) ///< Enable tracking origins in
- ///< MemorySanitizer
-CODEGENOPT(SanitizeMemoryUseAfterDtor, 1, 0) ///< Enable use-after-delete detection
- ///< in MemorySanitizer
-CODEGENOPT(SanitizeCfiCrossDso, 1, 0) ///< Enable cross-dso support in CFI.
-CODEGENOPT(SanitizeCoverageType, 2, 0) ///< Type of sanitizer coverage
- ///< instrumentation.
-CODEGENOPT(SanitizeCoverageIndirectCalls, 1, 0) ///< Enable sanitizer coverage
- ///< for indirect calls.
-CODEGENOPT(SanitizeCoverageTraceBB, 1, 0) ///< Enable basic block tracing in
- ///< in sanitizer coverage.
-CODEGENOPT(SanitizeCoverageTraceCmp, 1, 0) ///< Enable cmp instruction tracing
- ///< in sanitizer coverage.
-CODEGENOPT(SanitizeCoverage8bitCounters, 1, 0) ///< Use 8-bit frequency counters
- ///< in sanitizer coverage.
-CODEGENOPT(SanitizeCoverageTracePC, 1, 0) ///< Enable PC tracing
- ///< in sanitizer coverage.
-CODEGENOPT(SanitizeStats , 1, 0) ///< Collect statistics for sanitizers.
-CODEGENOPT(SimplifyLibCalls , 1, 1) ///< Set when -fbuiltin is enabled.
-CODEGENOPT(SoftFloat , 1, 0) ///< -soft-float.
-CODEGENOPT(StrictEnums , 1, 0) ///< Optimize based on strict enum definition.
-CODEGENOPT(StrictVTablePointers, 1, 0) ///< Optimize based on the strict vtable pointers
-CODEGENOPT(TimePasses , 1, 0) ///< Set when -ftime-report is enabled.
-CODEGENOPT(UnitAtATime , 1, 1) ///< Unused. For mirroring GCC optimization
- ///< selection.
-CODEGENOPT(UnrollLoops , 1, 0) ///< Control whether loops are unrolled.
-CODEGENOPT(RerollLoops , 1, 0) ///< Control whether loops are rerolled.
-CODEGENOPT(NoUseJumpTables , 1, 0) ///< Set when -fno-jump-tables is enabled.
-CODEGENOPT(UnsafeFPMath , 1, 0) ///< Allow unsafe floating point optzns.
-CODEGENOPT(UnwindTables , 1, 0) ///< Emit unwind tables.
-CODEGENOPT(VectorizeBB , 1, 0) ///< Run basic block vectorizer.
-CODEGENOPT(VectorizeLoop , 1, 0) ///< Run loop vectorizer.
-CODEGENOPT(VectorizeSLP , 1, 0) ///< Run SLP vectorizer.
-
- /// Attempt to use register sized accesses to bit-fields in structures, when
- /// possible.
-CODEGENOPT(UseRegisterSizedBitfieldAccess , 1, 0)
-
-CODEGENOPT(VerifyModule , 1, 1) ///< Control whether the module should be run
- ///< through the LLVM Verifier.
-
-CODEGENOPT(StackRealignment , 1, 0) ///< Control whether to force stack
- ///< realignment.
-CODEGENOPT(UseInitArray , 1, 0) ///< Control whether to use .init_array or
- ///< .ctors.
-VALUE_CODEGENOPT(StackAlignment , 32, 0) ///< Overrides default stack
- ///< alignment, if not 0.
-VALUE_CODEGENOPT(StackProbeSize , 32, 4096) ///< Overrides default stack
- ///< probe size, even if 0.
-CODEGENOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information
- ///< in debug info.
-
-CODEGENOPT(DebugTypeExtRefs, 1, 0) ///< Whether or not debug info should contain
- ///< external references to a PCH or module.
-
-CODEGENOPT(DebugExplicitImport, 1, 0) ///< Whether or not debug info should
- ///< contain explicit imports for
- ///< anonymous namespaces
-
-CODEGENOPT(EmitLLVMUseLists, 1, 0) ///< Control whether to serialize use-lists.
-
-CODEGENOPT(WholeProgramVTables, 1, 0) ///< Whether to apply whole-program
- /// vtable optimization.
-
-/// The user specified number of registers to be used for integral arguments,
-/// or 0 if unspecified.
-VALUE_CODEGENOPT(NumRegisterParameters, 32, 0)
-
-/// The lower bound for a buffer to be considered for stack protection.
-VALUE_CODEGENOPT(SSPBufferSize, 32, 0)
-
-/// The kind of generated debug info.
-ENUM_CODEGENOPT(DebugInfo, codegenoptions::DebugInfoKind, 3, codegenoptions::NoDebugInfo)
-
-/// Tune the debug info for this debugger.
-ENUM_CODEGENOPT(DebuggerTuning, llvm::DebuggerKind, 2,
- llvm::DebuggerKind::Default)
-
-/// Dwarf version. Version zero indicates to LLVM that no DWARF should be
-/// emitted.
-VALUE_CODEGENOPT(DwarfVersion, 3, 0)
-
-/// Whether we should emit CodeView debug information. It's possible to emit
-/// CodeView and DWARF into the same object.
-CODEGENOPT(EmitCodeView, 1, 0)
-
-/// The kind of inlining to perform.
-ENUM_CODEGENOPT(Inlining, InliningMethod, 2, NoInlining)
-
-// Vector functions library to use.
-ENUM_CODEGENOPT(VecLib, VectorLibrary, 1, NoLibrary)
-
-/// The default TLS model to use.
-ENUM_CODEGENOPT(DefaultTLSModel, TLSModel, 2, GeneralDynamicTLSModel)
-
-#undef CODEGENOPT
-#undef ENUM_CODEGENOPT
-#undef VALUE_CODEGENOPT
-
Removed: cfe/trunk/include/clang/Frontend/CodeGenOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=265701&view=auto
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.h (removed)
@@ -1,249 +0,0 @@
-//===--- CodeGenOptions.h ---------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the CodeGenOptions interface.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_FRONTEND_CODEGENOPTIONS_H
-#define LLVM_CLANG_FRONTEND_CODEGENOPTIONS_H
-
-#include "clang/Basic/DebugInfoOptions.h"
-#include "clang/Basic/Sanitizers.h"
-#include "llvm/Support/Regex.h"
-#include "llvm/Target/TargetOptions.h"
-#include <map>
-#include <memory>
-#include <string>
-#include <vector>
-
-namespace clang {
-
-/// \brief Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure
-/// that this large collection of bitfields is a trivial class type.
-class CodeGenOptionsBase {
-public:
-#define CODEGENOPT(Name, Bits, Default) unsigned Name : Bits;
-#define ENUM_CODEGENOPT(Name, Type, Bits, Default)
-#include "clang/Frontend/CodeGenOptions.def"
-
-protected:
-#define CODEGENOPT(Name, Bits, Default)
-#define ENUM_CODEGENOPT(Name, Type, Bits, Default) unsigned Name : Bits;
-#include "clang/Frontend/CodeGenOptions.def"
-};
-
-/// CodeGenOptions - Track various options which control how the code
-/// is optimized and passed to the backend.
-class CodeGenOptions : public CodeGenOptionsBase {
-public:
- enum InliningMethod {
- NoInlining, // Perform no inlining whatsoever.
- NormalInlining, // Use the standard function inlining pass.
- OnlyAlwaysInlining // Only run the always inlining pass.
- };
-
- enum VectorLibrary {
- NoLibrary, // Don't use any vector library.
- Accelerate // Use the Accelerate framework.
- };
-
- enum ObjCDispatchMethodKind {
- Legacy = 0,
- NonLegacy = 1,
- Mixed = 2
- };
-
- enum TLSModel {
- GeneralDynamicTLSModel,
- LocalDynamicTLSModel,
- InitialExecTLSModel,
- LocalExecTLSModel
- };
-
- enum FPContractModeKind {
- FPC_Off, // Form fused FP ops only where result will not be affected.
- FPC_On, // Form fused FP ops according to FP_CONTRACT rules.
- FPC_Fast // Aggressively fuse FP ops (E.g. FMA).
- };
-
- enum StructReturnConventionKind {
- SRCK_Default, // No special option was passed.
- SRCK_OnStack, // Small structs on the stack (-fpcc-struct-return).
- SRCK_InRegs // Small structs in registers (-freg-struct-return).
- };
-
- enum ProfileInstrKind {
- ProfileNone, // Profile instrumentation is turned off.
- ProfileClangInstr, // Clang instrumentation to generate execution counts
- // to use with PGO.
- ProfileIRInstr, // IR level PGO instrumentation in LLVM.
- };
-
- /// The code model to use (-mcmodel).
- std::string CodeModel;
-
- /// The filename with path we use for coverage files. The extension will be
- /// replaced.
- std::string CoverageFile;
-
- /// The version string to put into coverage files.
- char CoverageVersion[4];
-
- /// Enable additional debugging information.
- std::string DebugPass;
-
- /// The string to embed in debug information as the current working directory.
- std::string DebugCompilationDir;
-
- /// The string to embed in the debug information for the compile unit, if
- /// non-empty.
- std::string DwarfDebugFlags;
-
- std::map<std::string, std::string> DebugPrefixMap;
-
- /// The ABI to use for passing floating point arguments.
- std::string FloatABI;
-
- /// The float precision limit to use, if non-empty.
- std::string LimitFloatPrecision;
-
- /// The name of the bitcode file to link before optzns.
- std::vector<std::pair<unsigned, std::string>> LinkBitcodeFiles;
-
- /// The user provided name for the "main file", if non-empty. This is useful
- /// in situations where the input file name does not match the original input
- /// file, for example with -save-temps.
- std::string MainFileName;
-
- /// The name for the split debug info file that we'll break out. This is used
- /// in the backend for setting the name in the skeleton cu.
- std::string SplitDwarfFile;
-
- /// The name of the relocation model to use.
- std::string RelocationModel;
-
- /// The thread model to use
- std::string ThreadModel;
-
- /// If not an empty string, trap intrinsics are lowered to calls to this
- /// function instead of to trap instructions.
- std::string TrapFuncName;
-
- /// A list of command-line options to forward to the LLVM backend.
- std::vector<std::string> BackendOptions;
-
- /// A list of dependent libraries.
- std::vector<std::string> DependentLibraries;
-
- /// A list of linker options to embed in the object file.
- std::vector<std::string> LinkerOptions;
-
- /// Name of the profile file to use as output for -fprofile-instr-generate
- /// and -fprofile-generate.
- std::string InstrProfileOutput;
-
- /// Name of the profile file to use with -fprofile-sample-use.
- std::string SampleProfileFile;
-
- /// Name of the profile file to use as input for -fprofile-instr-use
- std::string ProfileInstrumentUsePath;
-
- /// Name of the function summary index file to use for ThinLTO function
- /// importing.
- std::string ThinLTOIndexFile;
-
- /// The EABI version to use
- std::string EABIVersion;
-
- /// A list of file names passed with -fcuda-include-gpubinary options to
- /// forward to CUDA runtime back-end for incorporating them into host-side
- /// object file.
- std::vector<std::string> CudaGpuBinaryFileNames;
-
- /// Regular expression to select optimizations for which we should enable
- /// optimization remarks. Transformation passes whose name matches this
- /// expression (and support this feature), will emit a diagnostic
- /// whenever they perform a transformation. This is enabled by the
- /// -Rpass=regexp flag.
- std::shared_ptr<llvm::Regex> OptimizationRemarkPattern;
-
- /// Regular expression to select optimizations for which we should enable
- /// missed optimization remarks. Transformation passes whose name matches this
- /// expression (and support this feature), will emit a diagnostic
- /// whenever they tried but failed to perform a transformation. This is
- /// enabled by the -Rpass-missed=regexp flag.
- std::shared_ptr<llvm::Regex> OptimizationRemarkMissedPattern;
-
- /// Regular expression to select optimizations for which we should enable
- /// optimization analyses. Transformation passes whose name matches this
- /// expression (and support this feature), will emit a diagnostic
- /// whenever they want to explain why they decided to apply or not apply
- /// a given transformation. This is enabled by the -Rpass-analysis=regexp
- /// flag.
- std::shared_ptr<llvm::Regex> OptimizationRemarkAnalysisPattern;
-
- /// Set of files definining the rules for the symbol rewriting.
- std::vector<std::string> RewriteMapFiles;
-
- /// Set of sanitizer checks that are non-fatal (i.e. execution should be
- /// continued when possible).
- SanitizerSet SanitizeRecover;
-
- /// Set of sanitizer checks that trap rather than diagnose.
- SanitizerSet SanitizeTrap;
-
- /// \brief A list of all -fno-builtin-* function names (e.g., memset).
- std::vector<std::string> NoBuiltinFuncs;
-
- /// List of blacklist files for the whole-program vtable optimization feature.
- std::vector<std::string> WholeProgramVTablesBlacklistFiles;
-
-public:
- // Define accessors/mutators for code generation options of enumeration type.
-#define CODEGENOPT(Name, Bits, Default)
-#define ENUM_CODEGENOPT(Name, Type, Bits, Default) \
- Type get##Name() const { return static_cast<Type>(Name); } \
- void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
-#include "clang/Frontend/CodeGenOptions.def"
-
- CodeGenOptions();
-
- /// \brief Is this a libc/libm function that is no longer recognized as a
- /// builtin because a -fno-builtin-* option has been specified?
- bool isNoBuiltinFunc(const char *Name) const;
-
- const std::vector<std::string> &getNoBuiltinFuncs() const {
- return NoBuiltinFuncs;
- }
-
- /// \brief Check if Clang profile instrumenation is on.
- bool hasProfileClangInstr() const {
- return getProfileInstr() == ProfileClangInstr;
- }
-
- /// \brief Check if IR level profile instrumentation is on.
- bool hasProfileIRInstr() const {
- return getProfileInstr() == ProfileIRInstr;
- }
-
- /// \brief Check if Clang profile use is on.
- bool hasProfileClangUse() const {
- return getProfileUse() == ProfileClangInstr;
- }
-
- /// \brief Check if IR level profile use is on.
- bool hasProfileIRUse() const {
- return getProfileUse() == ProfileIRInstr;
- }
-};
-
-} // end namespace clang
-
-#endif
Modified: cfe/trunk/include/clang/Frontend/CompilerInvocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CompilerInvocation.h?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CompilerInvocation.h (original)
+++ cfe/trunk/include/clang/Frontend/CompilerInvocation.h Thu Apr 7 12:49:44 2016
@@ -10,11 +10,11 @@
#ifndef LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
#define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/TargetOptions.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Frontend/DependencyOutputOptions.h"
#include "clang/Frontend/FrontendOptions.h"
#include "clang/Frontend/LangStandard.h"
@@ -26,6 +26,7 @@
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
+
#include <string>
#include <vector>
Modified: cfe/trunk/include/clang/module.modulemap
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/module.modulemap?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/include/clang/module.modulemap (original)
+++ cfe/trunk/include/clang/module.modulemap Thu Apr 7 12:49:44 2016
@@ -38,6 +38,7 @@ module Clang_Basic {
textual header "Basic/BuiltinsWebAssembly.def"
textual header "Basic/BuiltinsX86.def"
textual header "Basic/BuiltinsXCore.def"
+ textual header "Basic/CodeGenOptions.def"
textual header "Basic/DiagnosticOptions.def"
textual header "Basic/LangOptions.def"
textual header "Basic/OpenCLExtensions.def"
@@ -86,7 +87,6 @@ module Clang_Frontend {
requires cplusplus
umbrella "Frontend"
- textual header "Frontend/CodeGenOptions.def"
textual header "Frontend/LangStandards.def"
module * { export * }
Modified: cfe/trunk/lib/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/CMakeLists.txt (original)
+++ cfe/trunk/lib/Basic/CMakeLists.txt Thu Apr 7 12:49:44 2016
@@ -59,6 +59,7 @@ add_clang_library(clangBasic
Attributes.cpp
Builtins.cpp
CharInfo.cpp
+ CodeGenOptions.cpp
Diagnostic.cpp
DiagnosticIDs.cpp
DiagnosticOptions.cpp
Copied: cfe/trunk/lib/Basic/CodeGenOptions.cpp (from r265700, cfe/trunk/lib/Frontend/CodeGenOptions.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CodeGenOptions.cpp?p2=cfe/trunk/lib/Basic/CodeGenOptions.cpp&p1=cfe/trunk/lib/Frontend/CodeGenOptions.cpp&r1=265700&r2=265702&rev=265702&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CodeGenOptions.cpp (original)
+++ cfe/trunk/lib/Basic/CodeGenOptions.cpp Thu Apr 7 12:49:44 2016
@@ -7,7 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Frontend/CodeGenOptions.h"
+#include "clang/Basic/CodeGenOptions.h"
+
#include <string.h>
namespace clang {
@@ -15,7 +16,7 @@ namespace clang {
CodeGenOptions::CodeGenOptions() {
#define CODEGENOPT(Name, Bits, Default) Name = Default;
#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default);
-#include "clang/Frontend/CodeGenOptions.def"
+#include "clang/Basic/CodeGenOptions.def"
RelocationModel = "pic";
memcpy(CoverageVersion, "402*", 4);
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Thu Apr 7 12:49:44 2016
@@ -12,15 +12,15 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Builtins.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/MacroBuilder.h"
#include "clang/Basic/TargetBuiltins.h"
+#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/Version.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Apr 7 12:49:44 2016
@@ -8,10 +8,10 @@
//===----------------------------------------------------------------------===//
#include "clang/CodeGen/BackendUtil.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/TargetOptions.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "clang/Frontend/Utils.h"
#include "llvm/ADT/StringExtras.h"
@@ -22,10 +22,10 @@
#include "llvm/CodeGen/RegAllocRegistry.h"
#include "llvm/CodeGen/SchedulerRegistry.h"
#include "llvm/IR/DataLayout.h"
-#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
+#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/IR/Verifier.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Object/ModuleSummaryIndexObjectFile.h"
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Thu Apr 7 12:49:44 2016
@@ -23,7 +23,7 @@
#include "clang/AST/Mangle.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtCXX.h"
-#include "clang/Frontend/CodeGenOptions.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "llvm/ADT/StringExtras.h"
using namespace clang;
using namespace CodeGen;
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Apr 7 12:49:44 2016
@@ -23,18 +23,18 @@
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "clang/CodeGen/SwiftCallingConv.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
-#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicInst.h"
+#include "llvm/IR/Intrinsics.h"
#include "llvm/Transforms/Utils/Local.h"
using namespace clang;
using namespace CodeGen;
Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Thu Apr 7 12:49:44 2016
@@ -21,9 +21,9 @@
#include "clang/AST/EvaluatedExprVisitor.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtCXX.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/CodeGen/CGFunctionInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Transforms/Utils/SanitizerStats.h"
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Apr 7 12:49:44 2016
@@ -23,10 +23,10 @@
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/RecordLayout.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Version.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/ModuleMap.h"
#include "clang/Lex/PreprocessorOptions.h"
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Thu Apr 7 12:49:44 2016
@@ -18,8 +18,8 @@
#include "clang/AST/Expr.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/Type.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/SourceLocation.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/IR/DIBuilder.h"
Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Thu Apr 7 12:49:44 2016
@@ -23,10 +23,10 @@
#include "clang/AST/Decl.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/CGFunctionInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Intrinsics.h"
Modified: cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDeclCXX.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDeclCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDeclCXX.cpp Thu Apr 7 12:49:44 2016
@@ -15,7 +15,7 @@
#include "CGCXXABI.h"
#include "CGObjCRuntime.h"
#include "CGOpenMPRuntime.h"
-#include "clang/Frontend/CodeGenOptions.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/Support/Path.h"
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Thu Apr 7 12:49:44 2016
@@ -23,7 +23,7 @@
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclObjC.h"
-#include "clang/Frontend/CodeGenOptions.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/DataLayout.h"
Modified: cfe/trunk/lib/CodeGen/CGExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprCXX.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprCXX.cpp Thu Apr 7 12:49:44 2016
@@ -16,8 +16,8 @@
#include "CGCXXABI.h"
#include "CGDebugInfo.h"
#include "CGObjCRuntime.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/CodeGen/CGFunctionInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Intrinsics.h"
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Thu Apr 7 12:49:44 2016
@@ -21,8 +21,8 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/TargetInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Thu Apr 7 12:49:44 2016
@@ -22,9 +22,9 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtObjC.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/LangOptions.h"
#include "clang/CodeGen/CGFunctionInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
Modified: cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp Thu Apr 7 12:49:44 2016
@@ -20,13 +20,14 @@
#include "clang/AST/DeclCXX.h"
#include "clang/AST/Expr.h"
#include "clang/AST/RecordLayout.h"
-#include "clang/Frontend/CodeGenOptions.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
+
using namespace clang;
using namespace CodeGen;
Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Thu Apr 7 12:49:44 2016
@@ -16,13 +16,14 @@
#include "CodeGenModule.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/RecordLayout.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/CodeGen/CGFunctionInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Format.h"
#include "llvm/Transforms/Utils/Cloning.h"
+
#include <algorithm>
#include <cstdio>
Modified: cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenABITypes.cpp Thu Apr 7 12:49:44 2016
@@ -18,8 +18,8 @@
#include "clang/CodeGen/CodeGenABITypes.h"
#include "CodeGenModule.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/CodeGen/CGFunctionInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/PreprocessorOptions.h"
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Thu Apr 7 12:49:44 2016
@@ -13,9 +13,9 @@
#include "CodeGenFunction.h"
#include "CGBlocks.h"
-#include "CGCleanup.h"
#include "CGCUDARuntime.h"
#include "CGCXXABI.h"
+#include "CGCleanup.h"
#include "CGDebugInfo.h"
#include "CGOpenMPRuntime.h"
#include "CodeGenModule.h"
@@ -26,14 +26,15 @@
#include "clang/AST/DeclCXX.h"
#include "clang/AST/StmtCXX.h"
#include "clang/Basic/Builtins.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/CGFunctionInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Operator.h"
+
using namespace clang;
using namespace CodeGen;
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Thu Apr 7 12:49:44 2016
@@ -28,9 +28,9 @@
#include "clang/AST/Type.h"
#include "clang/Basic/ABI.h"
#include "clang/Basic/CapturedStmt.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/TargetInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Apr 7 12:49:44 2016
@@ -36,12 +36,12 @@
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CharInfo.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Version.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/Triple.h"
Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.h?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenPGO.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenPGO.h Thu Apr 7 12:49:44 2016
@@ -17,10 +17,11 @@
#include "CGBuilder.h"
#include "CodeGenModule.h"
#include "CodeGenTypes.h"
-#include "clang/Frontend/CodeGenOptions.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/MemoryBuffer.h"
+
#include <array>
#include <memory>
Modified: cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp Thu Apr 7 12:49:44 2016
@@ -20,12 +20,13 @@
#include "clang/AST/Attr.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/RecordLayout.h"
-#include "clang/Frontend/CodeGenOptions.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Type.h"
+
using namespace clang;
using namespace CodeGen;
Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CoverageMappingGen.h?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CoverageMappingGen.h (original)
+++ cfe/trunk/lib/CodeGen/CoverageMappingGen.h Thu Apr 7 12:49:44 2016
@@ -14,9 +14,9 @@
#ifndef LLVM_CLANG_LIB_CODEGEN_COVERAGEMAPPINGGEN_H
#define LLVM_CLANG_LIB_CODEGEN_COVERAGEMAPPINGGEN_H
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Lex/PPCallbacks.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
Modified: cfe/trunk/lib/CodeGen/ModuleBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ModuleBuilder.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ModuleBuilder.cpp (original)
+++ cfe/trunk/lib/CodeGen/ModuleBuilder.cpp Thu Apr 7 12:49:44 2016
@@ -17,14 +17,16 @@
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/TargetInfo.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
+
#include <memory>
+
using namespace clang;
namespace {
Modified: cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp (original)
+++ cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp Thu Apr 7 12:49:44 2016
@@ -14,10 +14,10 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/RecursiveASTVisitor.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/BackendUtil.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/Preprocessor.h"
@@ -33,6 +33,7 @@
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/TargetRegistry.h"
+
#include <memory>
using namespace clang;
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Thu Apr 7 12:49:44 2016
@@ -18,15 +18,16 @@
#include "CGValue.h"
#include "CodeGenFunction.h"
#include "clang/AST/RecordLayout.h"
+#include "clang/Basic/CodeGenOptions.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "clang/CodeGen/SwiftCallingConv.h"
-#include "clang/Frontend/CodeGenOptions.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/raw_ostream.h"
-#include <algorithm> // std::sort
+
+#include <algorithm> // std::sort
using namespace clang;
using namespace CodeGen;
Modified: cfe/trunk/lib/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CMakeLists.txt?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/lib/Frontend/CMakeLists.txt Thu Apr 7 12:49:44 2016
@@ -14,7 +14,6 @@ add_clang_library(clangFrontend
CacheTokens.cpp
ChainedDiagnosticConsumer.cpp
ChainedIncludesSource.cpp
- CodeGenOptions.cpp
CompilerInstance.cpp
CompilerInvocation.cpp
CreateInvocationFromCommandLine.cpp
Removed: cfe/trunk/lib/Frontend/CodeGenOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CodeGenOptions.cpp?rev=265701&view=auto
==============================================================================
--- cfe/trunk/lib/Frontend/CodeGenOptions.cpp (original)
+++ cfe/trunk/lib/Frontend/CodeGenOptions.cpp (removed)
@@ -1,32 +0,0 @@
-//===--- CodeGenOptions.cpp -----------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Frontend/CodeGenOptions.h"
-#include <string.h>
-
-namespace clang {
-
-CodeGenOptions::CodeGenOptions() {
-#define CODEGENOPT(Name, Bits, Default) Name = Default;
-#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default);
-#include "clang/Frontend/CodeGenOptions.def"
-
- RelocationModel = "pic";
- memcpy(CoverageVersion, "402*", 4);
-}
-
-bool CodeGenOptions::isNoBuiltinFunc(const char *Name) const {
- StringRef FuncName(Name);
- for (unsigned i = 0, e = NoBuiltinFuncs.size(); i != e; ++i)
- if (FuncName.equals(NoBuiltinFuncs[i]))
- return true;
- return false;
-}
-
-} // end namespace clang
Modified: cfe/trunk/unittests/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Basic/CMakeLists.txt?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/unittests/Basic/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Basic/CMakeLists.txt Thu Apr 7 12:49:44 2016
@@ -12,6 +12,5 @@ add_clang_unittest(BasicTests
target_link_libraries(BasicTests
clangBasic
- clangFrontend
clangLex
)
Modified: cfe/trunk/unittests/Lex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/CMakeLists.txt?rev=265702&r1=265701&r2=265702&view=diff
==============================================================================
--- cfe/trunk/unittests/Lex/CMakeLists.txt (original)
+++ cfe/trunk/unittests/Lex/CMakeLists.txt Thu Apr 7 12:49:44 2016
@@ -12,7 +12,6 @@ add_clang_unittest(LexTests
target_link_libraries(LexTests
clangAST
clangBasic
- clangFrontend
clangLex
clangParse
clangSema
More information about the cfe-commits
mailing list