Erich Keane | ebba592 | 2017-07-21 22:37:03 +0000 | [diff] [blame^] | 1 | //===--- BPF.cpp - Implement BPF target feature support -------------------===// |
| 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 | // |
| 10 | // This file implements BPF TargetInfo objects. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "BPF.h" |
| 15 | #include "Targets.h" |
| 16 | #include "clang/Basic/MacroBuilder.h" |
| 17 | |
| 18 | using namespace clang; |
| 19 | using namespace clang::targets; |
| 20 | |
| 21 | void BPFTargetInfo::getTargetDefines(const LangOptions &Opts, |
| 22 | MacroBuilder &Builder) const { |
| 23 | DefineStd(Builder, "bpf", Opts); |
| 24 | Builder.defineMacro("__BPF__"); |
| 25 | } |