1 //===--- CodeGenOptions.cpp -----------------------------------------------===// 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 #include "clang/Basic/CodeGenOptions.h" 11 12 #include <string.h> 13 14 namespace clang { 15 16 CodeGenOptions::CodeGenOptions() { 17 #define CODEGENOPT(Name, Bits, Default) Name = Default; 18 #define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default); 19 #include "clang/Basic/CodeGenOptions.def" 20 21 RelocationModel = "pic"; 22 memcpy(CoverageVersion, "402*", 4); 23 } 24 25 bool CodeGenOptions::isNoBuiltinFunc(const char *Name) const { 26 StringRef FuncName(Name); 27 for (unsigned i = 0, e = NoBuiltinFuncs.size(); i != e; ++i) 28 if (FuncName.equals(NoBuiltinFuncs[i])) 29 return true; 30 return false; 31 } 32 33 } // end namespace clang 34