clang  6.0.0svn
LangOptions.cpp
Go to the documentation of this file.
1 //===--- LangOptions.cpp - C Language Family Language Options ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the LangOptions class.
11 //
12 //===----------------------------------------------------------------------===//
14 #include "llvm/ADT/StringRef.h"
15 
16 using namespace clang;
17 
19  : IsHeaderFile(false) {
20 #define LANGOPT(Name, Bits, Default, Description) Name = Default;
21 #define ENUM_LANGOPT(Name, Type, Bits, Default, Description) set##Name(Default);
22 #include "clang/Basic/LangOptions.def"
23 }
24 
26 #define LANGOPT(Name, Bits, Default, Description)
27 #define BENIGN_LANGOPT(Name, Bits, Default, Description) Name = Default;
28 #define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
29  Name = Default;
30 #include "clang/Basic/LangOptions.def"
31 
32  // These options do not affect AST generation.
36 
37  CurrentModule.clear();
38  IsHeaderFile = false;
39 }
40 
41 bool LangOptions::isNoBuiltinFunc(StringRef FuncName) const {
42  for (unsigned i = 0, e = NoBuiltinFuncs.size(); i != e; ++i)
43  if (FuncName.equals(NoBuiltinFuncs[i]))
44  return true;
45  return false;
46 }
bool isNoBuiltinFunc(StringRef Name) const
Is this a libc/libm function that is no longer recognized as a builtin because a -fno-builtin-* optio...
Definition: LangOptions.cpp:41
std::vector< std::string > XRayAlwaysInstrumentFiles
Paths to the XRay "always instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "always instrument" attribute.
Definition: LangOptions.h:110
void resetNonModularOptions()
Reset all of the options that are not considered when building a module.
Definition: LangOptions.cpp:25
std::string CurrentModule
The name of the current module, of which the main source file is a part.
Definition: LangOptions.h:131
static bool IsHeaderFile(const std::string &Filename)
Defines the clang::LangOptions interface.
#define false
Definition: stdbool.h:33
Dataflow Directional Tag Classes.
bool IsHeaderFile
Indicates whether the front-end is explicitly told that the input is a header file (i...
Definition: LangOptions.h:155
std::vector< std::string > XRayNeverInstrumentFiles
Paths to the XRay "never instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "never instrument" attribute.
Definition: LangOptions.h:115
std::vector< std::string > NoBuiltinFuncs
A list of all -fno-builtin-* function names (e.g., memset).
Definition: LangOptions.h:143
std::vector< std::string > SanitizerBlacklistFiles
Paths to blacklist files specifying which objects (files, functions, variables) should not be instrum...
Definition: LangOptions.h:105