LLVM API Documentation

MCTargetOptions.h
Go to the documentation of this file.
00001 //===- MCTargetOptions.h - MC Target Options -------------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_MC_MCTARGETOPTIONS_H
00011 #define LLVM_MC_MCTARGETOPTIONS_H
00012 
00013 namespace llvm {
00014 
00015 class MCTargetOptions {
00016 public:
00017   enum AsmInstrumentation {
00018     AsmInstrumentationNone,
00019     AsmInstrumentationAddress
00020   };
00021 
00022   /// Enables AddressSanitizer instrumentation at machine level.
00023   bool SanitizeAddress : 1;
00024 
00025   bool MCRelaxAll : 1;
00026   bool MCNoExecStack : 1;
00027   bool MCFatalWarnings : 1;
00028   bool MCSaveTempLabels : 1;
00029   bool MCUseDwarfDirectory : 1;
00030   bool ShowMCEncoding : 1;
00031   bool ShowMCInst : 1;
00032   bool AsmVerbose : 1;
00033   int DwarfVersion;
00034   MCTargetOptions();
00035 };
00036 
00037 inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
00038 #define ARE_EQUAL(X) LHS.X == RHS.X
00039   return (ARE_EQUAL(SanitizeAddress) &&
00040           ARE_EQUAL(MCRelaxAll) &&
00041           ARE_EQUAL(MCNoExecStack) &&
00042           ARE_EQUAL(MCFatalWarnings) &&
00043           ARE_EQUAL(MCSaveTempLabels) &&
00044           ARE_EQUAL(MCUseDwarfDirectory) &&
00045           ARE_EQUAL(ShowMCEncoding) &&
00046           ARE_EQUAL(ShowMCInst) &&
00047           ARE_EQUAL(AsmVerbose) &&
00048           ARE_EQUAL(DwarfVersion));
00049 #undef ARE_EQUAL
00050 }
00051 
00052 inline bool operator!=(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
00053   return !(LHS == RHS);
00054 }
00055 
00056 } // end namespace llvm
00057 
00058 #endif