CodeGenOptions.cpp 997 B

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