Alexey Samsonov | e106102 | 2014-11-11 00:22:12 +0000 | [diff] [blame] | 1 | //===--- CodeGenOptions.cpp -----------------------------------------------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Alexey Samsonov | e106102 | 2014-11-11 00:22:12 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Richard Trieu | 6368818 | 2018-12-11 03:18:39 +0000 | [diff] [blame] | 9 | #include "clang/Basic/CodeGenOptions.h" |
Chandler Carruth | 0d9593d | 2015-01-14 11:29:14 +0000 | [diff] [blame] | 10 | #include <string.h> |
Alexey Samsonov | e106102 | 2014-11-11 00:22:12 +0000 | [diff] [blame] | 11 | |
| 12 | namespace clang { |
| 13 | |
| 14 | CodeGenOptions::CodeGenOptions() { |
| 15 | #define CODEGENOPT(Name, Bits, Default) Name = Default; |
| 16 | #define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default); |
Richard Trieu | 6368818 | 2018-12-11 03:18:39 +0000 | [diff] [blame] | 17 | #include "clang/Basic/CodeGenOptions.def" |
Alexey Samsonov | e106102 | 2014-11-11 00:22:12 +0000 | [diff] [blame] | 18 | |
Rafael Espindola | e1d7053 | 2018-01-18 00:20:03 +0000 | [diff] [blame] | 19 | RelocationModel = llvm::Reloc::PIC_; |
Alexey Samsonov | e106102 | 2014-11-11 00:22:12 +0000 | [diff] [blame] | 20 | memcpy(CoverageVersion, "402*", 4); |
| 21 | } |
| 22 | |
Chad Rosier | 7dbc9cf | 2016-01-06 14:35:46 +0000 | [diff] [blame] | 23 | bool 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 Samsonov | e106102 | 2014-11-11 00:22:12 +0000 | [diff] [blame] | 31 | } // end namespace clang |