clang 10.0.0git

PNaCl.cpp
Go to the documentation of this file.
1 //===--- PNaCl.cpp - Implement PNaCl target feature support ---------------===//
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 //
9 // This file implements PNaCl TargetInfo objects.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "PNaCl.h"
14 #include "clang/Basic/MacroBuilder.h"
15
16 using namespace clang;
17 using namespace clang::targets;
18
19 ArrayRef<const char *> PNaClTargetInfo::getGCCRegNames() const { return None; }
20
21 ArrayRef<TargetInfo::GCCRegAlias> PNaClTargetInfo::getGCCRegAliases() const {
22 return None;
23 }
24
25 void PNaClTargetInfo::getArchDefines(const LangOptions &Opts,
26 MacroBuilder &Builder) const {
27 Builder.defineMacro("__le32__");
28 Builder.defineMacro("__pnacl__");
29 }
MacroBuilder.h
Defines the clang::MacroBuilder utility class.
clang::targets
Definition: AArch64.h:21
PNaCl.h
clang::targets::PNaClTargetInfo::getArchDefines
void getArchDefines(const LangOptions &Opts, MacroBuilder &Builder) const
Definition: PNaCl.cpp:25
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:53
clang::targets::PNaClTargetInfo::getGCCRegNames
ArrayRef< const char * > getGCCRegNames() const override
Definition: PNaCl.cpp:19
llvm::ArrayRef
Definition: LLVM.h:31
clang::targets::PNaClTargetInfo::getGCCRegAliases
ArrayRef< TargetInfo::GCCRegAlias > getGCCRegAliases() const override
Definition: PNaCl.cpp:21
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:21
clang::MacroBuilder
Definition: MacroBuilder.h:23
clang::MacroBuilder::defineMacro
void defineMacro(const Twine &Name, const Twine &Value="1")
Append a #define line for macro of the form "\#define Name Value\n".
Definition: MacroBuilder.h:29