1 //===--- CodeGenOptions.cpp -----------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "clang/Basic/CodeGenOptions.h" 10 #include <string.h> 11 12 namespace clang { 13 CodeGenOptions::CodeGenOptions() 14 : FPDenormalMode(llvm::DenormalMode::getIEEE()), 15 FP32DenormalMode(llvm::DenormalMode::getIEEE()), Argv0(nullptr) { 16 #define CODEGENOPT(Name, Bits, Default) Name = Default; 17 #define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default); 18 #include "clang/Basic/CodeGenOptions.def" 19 20 RelocationModel = llvm::Reloc::PIC_; 21 memcpy(CoverageVersion, "408*", 4); 22 } 23 24 bool CodeGenOptions::isNoBuiltinFunc(const char *Name) const { 25 StringRef FuncName(Name); 26 for (unsigned i = 0, e = NoBuiltinFuncs.size(); i != e; ++i) 27 if (FuncName.equals(NoBuiltinFuncs[i])) 28 return true; 29 return false; 30 } 31 32 } // end namespace clang 33