CodeGenOptions.cpp 975 B

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