blob: fa186380f1093a7aac785a00fd1d7d98c031e052 [file] [log] [blame]
Alexey Samsonove1061022014-11-11 00:22:12 +00001//===--- CodeGenOptions.cpp -----------------------------------------------===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Alexey Samsonove1061022014-11-11 00:22:12 +00006//
7//===----------------------------------------------------------------------===//
8
Richard Trieu63688182018-12-11 03:18:39 +00009#include "clang/Basic/CodeGenOptions.h"
Chandler Carruth0d9593d2015-01-14 11:29:14 +000010#include <string.h>
Alexey Samsonove1061022014-11-11 00:22:12 +000011
12namespace clang {
13
14CodeGenOptions::CodeGenOptions() {
15#define CODEGENOPT(Name, Bits, Default) Name = Default;
16#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default);
Richard Trieu63688182018-12-11 03:18:39 +000017#include "clang/Basic/CodeGenOptions.def"
Alexey Samsonove1061022014-11-11 00:22:12 +000018
Rafael Espindolae1d70532018-01-18 00:20:03 +000019 RelocationModel = llvm::Reloc::PIC_;
Alexey Samsonove1061022014-11-11 00:22:12 +000020 memcpy(CoverageVersion, "402*", 4);
21}
22
Chad Rosier7dbc9cf2016-01-06 14:35:46 +000023bool CodeGenOptions::isNoBuiltinFunc(const char *Name) const {
24 StringRef FuncName(Name);
25 for (unsigned i = 0, e = NoBuiltinFuncs.size(); i != e; ++i)
26 if (FuncName.equals(NoBuiltinFuncs[i]))
27 return true;
28 return false;
29}
30
Alexey Samsonove1061022014-11-11 00:22:12 +000031} // end namespace clang