LLVM  15.0.0git
IFSHandler.cpp
Go to the documentation of this file.
1 //===- IFSHandler.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 
10 #include "llvm/ADT/STLExtras.h"
11 #include "llvm/ADT/StringRef.h"
12 #include "llvm/ADT/StringSwitch.h"
13 #include "llvm/ADT/Triple.h"
14 #include "llvm/BinaryFormat/ELF.h"
16 #include "llvm/Support/Error.h"
20 #include <functional>
21 
22 using namespace llvm;
23 using namespace llvm::ifs;
24 
26 
27 namespace llvm {
28 namespace yaml {
29 
30 /// YAML traits for ELFSymbolType.
31 template <> struct ScalarEnumerationTraits<IFSSymbolType> {
32  static void enumeration(IO &IO, IFSSymbolType &SymbolType) {
33  IO.enumCase(SymbolType, "NoType", IFSSymbolType::NoType);
34  IO.enumCase(SymbolType, "Func", IFSSymbolType::Func);
35  IO.enumCase(SymbolType, "Object", IFSSymbolType::Object);
36  IO.enumCase(SymbolType, "TLS", IFSSymbolType::TLS);
37  IO.enumCase(SymbolType, "Unknown", IFSSymbolType::Unknown);
38  // Treat other symbol types as noise, and map to Unknown.
39  if (!IO.outputting() && IO.matchEnumFallback())
41  }
42 };
43 
44 template <> struct ScalarTraits<IFSEndiannessType> {
45  static void output(const IFSEndiannessType &Value, void *,
46  llvm::raw_ostream &Out) {
47  switch (Value) {
49  Out << "big";
50  break;
52  Out << "little";
53  break;
54  default:
55  llvm_unreachable("Unsupported endianness");
56  }
57  }
58 
59  static StringRef input(StringRef Scalar, void *, IFSEndiannessType &Value) {
65  return "Unsupported endianness";
66  }
67  return StringRef();
68  }
69 
70  static QuotingType mustQuote(StringRef) { return QuotingType::None; }
71 };
72 
73 template <> struct ScalarTraits<IFSBitWidthType> {
74  static void output(const IFSBitWidthType &Value, void *,
75  llvm::raw_ostream &Out) {
76  switch (Value) {
78  Out << "32";
79  break;
81  Out << "64";
82  break;
83  default:
84  llvm_unreachable("Unsupported bit width");
85  }
86  }
87 
88  static StringRef input(StringRef Scalar, void *, IFSBitWidthType &Value) {
94  return "Unsupported bit width";
95  }
96  return StringRef();
97  }
98 
99  static QuotingType mustQuote(StringRef) { return QuotingType::None; }
100 };
101 
102 template <> struct MappingTraits<IFSTarget> {
103  static void mapping(IO &IO, IFSTarget &Target) {
104  IO.mapOptional("ObjectFormat", Target.ObjectFormat);
105  IO.mapOptional("Arch", Target.ArchString);
106  IO.mapOptional("Endianness", Target.Endianness);
107  IO.mapOptional("BitWidth", Target.BitWidth);
108  }
109 
110  // Compacts symbol information into a single line.
111  static const bool flow = true; // NOLINT(readability-identifier-naming)
112 };
113 
114 /// YAML traits for ELFSymbol.
115 template <> struct MappingTraits<IFSSymbol> {
116  static void mapping(IO &IO, IFSSymbol &Symbol) {
117  IO.mapRequired("Name", Symbol.Name);
118  IO.mapRequired("Type", Symbol.Type);
119  // The need for symbol size depends on the symbol type.
120  if (Symbol.Type == IFSSymbolType::NoType) {
121  // Size is None, so we are reading it in, or it is non 0 so we
122  // should emit it.
123  if (!Symbol.Size || *Symbol.Size)
124  IO.mapOptional("Size", Symbol.Size);
125  } else if (Symbol.Type != IFSSymbolType::Func) {
126  IO.mapOptional("Size", Symbol.Size);
127  }
128  IO.mapOptional("Undefined", Symbol.Undefined, false);
129  IO.mapOptional("Weak", Symbol.Weak, false);
130  IO.mapOptional("Warning", Symbol.Warning);
131  }
132 
133  // Compacts symbol information into a single line.
134  static const bool flow = true; // NOLINT(readability-identifier-naming)
135 };
136 
137 /// YAML traits for ELFStub objects.
138 template <> struct MappingTraits<IFSStub> {
139  static void mapping(IO &IO, IFSStub &Stub) {
140  if (!IO.mapTag("!ifs-v1", true))
141  IO.setError("Not a .tbe YAML file.");
142  IO.mapRequired("IfsVersion", Stub.IfsVersion);
143  IO.mapOptional("SoName", Stub.SoName);
144  IO.mapOptional("Target", Stub.Target);
145  IO.mapOptional("NeededLibs", Stub.NeededLibs);
146  IO.mapRequired("Symbols", Stub.Symbols);
147  }
148 };
149 
150 /// YAML traits for ELFStubTriple objects.
151 template <> struct MappingTraits<IFSStubTriple> {
152  static void mapping(IO &IO, IFSStubTriple &Stub) {
153  if (!IO.mapTag("!ifs-v1", true))
154  IO.setError("Not a .tbe YAML file.");
155  IO.mapRequired("IfsVersion", Stub.IfsVersion);
156  IO.mapOptional("SoName", Stub.SoName);
157  IO.mapOptional("Target", Stub.Target.Triple);
158  IO.mapOptional("NeededLibs", Stub.NeededLibs);
159  IO.mapRequired("Symbols", Stub.Symbols);
160  }
161 };
162 } // end namespace yaml
163 } // end namespace llvm
164 
165 /// Attempt to determine if a Text stub uses target triple.
167  for (line_iterator I(MemoryBufferRef(Buf, "ELFStub")); !I.is_at_eof(); ++I) {
168  StringRef Line = (*I).trim();
169  if (Line.startswith("Target:")) {
170  if (Line == "Target:" || Line.contains("{")) {
171  return false;
172  }
173  }
174  }
175  return true;
176 }
177 
179  yaml::Input YamlIn(Buf);
180  std::unique_ptr<IFSStubTriple> Stub(new IFSStubTriple());
181  if (usesTriple(Buf)) {
182  YamlIn >> *Stub;
183  } else {
184  YamlIn >> *static_cast<IFSStub *>(Stub.get());
185  }
186  if (std::error_code Err = YamlIn.error()) {
187  return createStringError(Err, "YAML failed reading as IFS");
188  }
189 
190  if (Stub->IfsVersion > IFSVersionCurrent)
191  return make_error<StringError>(
192  "IFS version " + Stub->IfsVersion.getAsString() + " is unsupported.",
193  std::make_error_code(std::errc::invalid_argument));
194  if (Stub->Target.ArchString) {
195  Stub->Target.Arch =
196  ELF::convertArchNameToEMachine(*Stub->Target.ArchString);
197  }
198  return std::move(Stub);
199 }
200 
202  yaml::Output YamlOut(OS, nullptr, /*WrapColumn =*/0);
203  std::unique_ptr<IFSStubTriple> CopyStub(new IFSStubTriple(Stub));
204  if (Stub.Target.Arch) {
205  CopyStub->Target.ArchString = std::string(
206  ELF::convertEMachineToArchName(Stub.Target.Arch.getValue()));
207  }
208  IFSTarget Target = Stub.Target;
209 
210  if (CopyStub->Target.Triple ||
211  (!CopyStub->Target.ArchString && !CopyStub->Target.Endianness &&
212  !CopyStub->Target.BitWidth))
213  YamlOut << *CopyStub;
214  else
215  YamlOut << *static_cast<IFSStub *>(CopyStub.get());
216  return Error::success();
217 }
218 
220  Optional<IFSEndiannessType> OverrideEndianness,
221  Optional<IFSBitWidthType> OverrideBitWidth,
222  Optional<std::string> OverrideTriple) {
223  std::error_code OverrideEC(1, std::generic_category());
224  if (OverrideArch) {
225  if (Stub.Target.Arch &&
226  Stub.Target.Arch.getValue() != OverrideArch.getValue()) {
227  return make_error<StringError>(
228  "Supplied Arch conflicts with the text stub", OverrideEC);
229  }
230  Stub.Target.Arch = OverrideArch.getValue();
231  }
232  if (OverrideEndianness) {
233  if (Stub.Target.Endianness &&
234  Stub.Target.Endianness.getValue() != OverrideEndianness.getValue()) {
235  return make_error<StringError>(
236  "Supplied Endianness conflicts with the text stub", OverrideEC);
237  }
238  Stub.Target.Endianness = OverrideEndianness.getValue();
239  }
240  if (OverrideBitWidth) {
241  if (Stub.Target.BitWidth &&
242  Stub.Target.BitWidth.getValue() != OverrideBitWidth.getValue()) {
243  return make_error<StringError>(
244  "Supplied BitWidth conflicts with the text stub", OverrideEC);
245  }
246  Stub.Target.BitWidth = OverrideBitWidth.getValue();
247  }
248  if (OverrideTriple) {
249  if (Stub.Target.Triple &&
250  Stub.Target.Triple.getValue() != OverrideTriple.getValue()) {
251  return make_error<StringError>(
252  "Supplied Triple conflicts with the text stub", OverrideEC);
253  }
254  Stub.Target.Triple = OverrideTriple.getValue();
255  }
256  return Error::success();
257 }
258 
259 Error ifs::validateIFSTarget(IFSStub &Stub, bool ParseTriple) {
260  std::error_code ValidationEC(1, std::generic_category());
261  if (Stub.Target.Triple) {
262  if (Stub.Target.Arch || Stub.Target.BitWidth || Stub.Target.Endianness ||
263  Stub.Target.ObjectFormat) {
264  return make_error<StringError>(
265  "Target triple cannot be used simultaneously with ELF target format",
266  ValidationEC);
267  }
268  if (ParseTriple) {
269  IFSTarget TargetFromTriple = parseTriple(*Stub.Target.Triple);
270  Stub.Target.Arch = TargetFromTriple.Arch;
271  Stub.Target.BitWidth = TargetFromTriple.BitWidth;
272  Stub.Target.Endianness = TargetFromTriple.Endianness;
273  }
274  return Error::success();
275  }
276  if (!Stub.Target.Arch || !Stub.Target.BitWidth || !Stub.Target.Endianness) {
277  // TODO: unify the error message.
278  if (!Stub.Target.Arch) {
279  return make_error<StringError>("Arch is not defined in the text stub",
280  ValidationEC);
281  }
282  if (!Stub.Target.BitWidth) {
283  return make_error<StringError>("BitWidth is not defined in the text stub",
284  ValidationEC);
285  }
286  if (!Stub.Target.Endianness) {
287  return make_error<StringError>(
288  "Endianness is not defined in the text stub", ValidationEC);
289  }
290  }
291  return Error::success();
292 }
293 
295  Triple IFSTriple(TripleStr);
296  IFSTarget RetTarget;
297  // TODO: Implement a Triple Arch enum to e_machine map.
298  switch (IFSTriple.getArch()) {
299  case Triple::ArchType::aarch64:
300  RetTarget.Arch = (IFSArch)ELF::EM_AARCH64;
301  break;
302  case Triple::ArchType::x86_64:
303  RetTarget.Arch = (IFSArch)ELF::EM_X86_64;
304  break;
305  default:
306  RetTarget.Arch = (IFSArch)ELF::EM_NONE;
307  }
308  RetTarget.Endianness = IFSTriple.isLittleEndian() ? IFSEndiannessType::Little
310  RetTarget.BitWidth =
312  return RetTarget;
313 }
314 
315 void ifs::stripIFSTarget(IFSStub &Stub, bool StripTriple, bool StripArch,
316  bool StripEndianness, bool StripBitWidth) {
317  if (StripTriple || StripArch) {
318  Stub.Target.Arch.reset();
319  Stub.Target.ArchString.reset();
320  }
321  if (StripTriple || StripEndianness) {
322  Stub.Target.Endianness.reset();
323  }
324  if (StripTriple || StripBitWidth) {
325  Stub.Target.BitWidth.reset();
326  }
327  if (StripTriple) {
328  Stub.Target.Triple.reset();
329  }
330  if (!Stub.Target.Arch && !Stub.Target.BitWidth && !Stub.Target.Endianness) {
331  Stub.Target.ObjectFormat.reset();
332  }
333 }
334 
335 Error ifs::filterIFSSyms(IFSStub &Stub, bool StripUndefined,
336  const std::vector<std::string> &Exclude) {
337  std::function<bool(const IFSSymbol &)> Filter = [](const IFSSymbol &) {
338  return false;
339  };
340 
341  if (StripUndefined) {
342  Filter = [Filter](const IFSSymbol &Sym) {
343  return Sym.Undefined || Filter(Sym);
344  };
345  }
346 
347  for (StringRef Glob : Exclude) {
349  if (!PatternOrErr)
350  return PatternOrErr.takeError();
351  Filter = [Pattern = *PatternOrErr, Filter](const IFSSymbol &Sym) {
352  return Pattern.match(Sym.Name) || Filter(Sym);
353  };
354  }
355 
357 
358  return Error::success();
359 }
llvm::StringSwitch::Case
StringSwitch & Case(StringLiteral S, T Value)
Definition: StringSwitch.h:69
llvm::ifs::IFSSymbolType::Unknown
@ Unknown
llvm::ifs::IFSStub::NeededLibs
std::vector< std::string > NeededLibs
Definition: IFSStub.h:94
llvm::StringRef::startswith
LLVM_NODISCARD bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
Definition: StringRef.h:290
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::ifs::IFSBitWidthType
IFSBitWidthType
Definition: IFSStub.h:44
llvm::line_iterator
A forward iterator which reads text lines from a buffer.
Definition: LineIterator.h:33
llvm::yaml::ScalarTraits< IFSBitWidthType >::output
static void output(const IFSBitWidthType &Value, void *, llvm::raw_ostream &Out)
Definition: IFSHandler.cpp:74
llvm::ifs::IFSSymbol
Definition: IFSStub.h:52
llvm::ifs
Definition: ELFObjHandler.h:23
StringRef.h
llvm::StringSwitch::Default
LLVM_NODISCARD R Default(T Value)
Definition: StringSwitch.h:183
llvm::Target
Target - Wrapper for Target specific information.
Definition: TargetRegistry.h:145
llvm::ifs::filterIFSSyms
Error filterIFSSyms(IFSStub &Stub, bool StripUndefined, const std::vector< std::string > &Exclude={})
Definition: IFSHandler.cpp:335
llvm::ifs::IFSTarget::Arch
Optional< IFSArch > Arch
Definition: IFSStub.h:67
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition: Error.h:329
llvm::XCOFF::SymbolType
SymbolType
Definition: XCOFF.h:224
llvm::erase_if
void erase_if(Container &C, UnaryPredicate P)
Provide a container algorithm similar to C++ Library Fundamentals v2's erase_if which is equivalent t...
Definition: STLExtras.h:1807
llvm::yaml::ScalarTraits< IFSEndiannessType >::input
static StringRef input(StringRef Scalar, void *, IFSEndiannessType &Value)
Definition: IFSHandler.cpp:59
Error.h
llvm::ifs::IFSVersionCurrent
const VersionTuple IFSVersionCurrent(3, 0)
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::ELF::EM_NONE
@ EM_NONE
Definition: ELF.h:133
IFSHandler.h
llvm::Optional
Definition: APInt.h:33
llvm::yaml::MappingTraits< IFSStub >::mapping
static void mapping(IO &IO, IFSStub &Stub)
Definition: IFSHandler.cpp:139
llvm::ifs::writeIFSToOutputStream
Error writeIFSToOutputStream(raw_ostream &OS, const IFSStub &Stub)
Attempts to write an IFS interface file to a raw_ostream.
Definition: IFSHandler.cpp:201
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
STLExtras.h
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:51
llvm::Pattern::match
MatchResult match(StringRef Buffer, const SourceMgr &SM) const
Matches the pattern string against the input buffer Buffer.
llvm::MemoryBufferRef
Definition: MemoryBufferRef.h:22
llvm::Triple::isArch64Bit
bool isArch64Bit() const
Test whether the architecture is 64-bit.
Definition: Triple.cpp:1444
llvm::ifs::IFSBitWidthType::Unknown
@ Unknown
llvm::ifs::IFSArch
uint16_t IFSArch
Definition: IFSStub.h:24
llvm::Triple::isLittleEndian
bool isLittleEndian() const
Tests whether the target triple is little endian.
Definition: Triple.cpp:1717
ELF.h
llvm::ifs::IFSSymbolType
IFSSymbolType
Definition: IFSStub.h:26
llvm::ifs::validateIFSTarget
Error validateIFSTarget(IFSStub &Stub, bool ParseTriple)
Validate the target platform inforation in the text stub.
Definition: IFSHandler.cpp:259
llvm::ifs::IFSStub
Definition: IFSStub.h:89
llvm::ifs::IFSSymbolType::TLS
@ TLS
llvm::ifs::readIFSFromBuffer
Expected< std::unique_ptr< IFSStub > > readIFSFromBuffer(StringRef Buf)
Attempts to read an IFS interface file from a StringRef buffer.
Definition: IFSHandler.cpp:178
llvm::ifs::IFSBitWidthType::IFS32
@ IFS32
llvm::StringRef::contains
LLVM_NODISCARD bool contains(StringRef Other) const
Return true if the given string is a substring of *this, and false otherwise.
Definition: StringRef.h:466
LineIterator.h
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:54
llvm::ifs::IFSEndiannessType::Big
@ Big
llvm::ifs::IFSStub::SoName
Optional< std::string > SoName
Definition: IFSStub.h:92
llvm::Triple::getArch
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition: Triple.h:345
IFSStub.h
llvm::None
const NoneType None
Definition: None.h:24
llvm::ifs::IFSTarget::BitWidth
Optional< IFSBitWidthType > BitWidth
Definition: IFSStub.h:70
llvm::ifs::IFSEndiannessType::Unknown
@ Unknown
llvm::ifs::IFSTarget::ArchString
Optional< std::string > ArchString
Definition: IFSStub.h:68
llvm::StringRef::trim
LLVM_NODISCARD StringRef trim(char Char) const
Return string with consecutive Char characters starting from the left and right removed.
Definition: StringRef.h:874
llvm::ClrHandlerType::Filter
@ Filter
llvm::ifs::IFSSymbolType::NoType
@ NoType
llvm::ifs::IFSTarget::Triple
Optional< std::string > Triple
Definition: IFSStub.h:65
llvm::yaml::ScalarTraits< IFSBitWidthType >::input
static StringRef input(StringRef Scalar, void *, IFSBitWidthType &Value)
Definition: IFSHandler.cpp:88
llvm::Optional::reset
void reset()
Definition: Optional.h:301
llvm::ifs::stripIFSTarget
void stripIFSTarget(IFSStub &Stub, bool StripTriple, bool StripArch, bool StripEndianness, bool StripBitWidth)
Strips target platform information from the text stub.
Definition: IFSHandler.cpp:315
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::yaml::ScalarTraits< IFSEndiannessType >::output
static void output(const IFSEndiannessType &Value, void *, llvm::raw_ostream &Out)
Definition: IFSHandler.cpp:45
llvm::yaml::ScalarEnumerationTraits< IFSSymbolType >::enumeration
static void enumeration(IO &IO, IFSSymbolType &SymbolType)
Definition: IFSHandler.cpp:32
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::ifs::IFSBitWidthType::IFS64
@ IFS64
llvm::ifs::IFSEndiannessType::Little
@ Little
llvm::Optional::getValue
constexpr const T & getValue() const &
Definition: Optional.h:306
llvm::ifs::IFSStubTriple
Definition: IFSStub.h:107
function
print Print MemDeps of function
Definition: MemDepPrinter.cpp:82
Triple.h
YAMLTraits.h
llvm::ifs::IFSEndiannessType
IFSEndiannessType
Definition: IFSStub.h:36
llvm::GlobPattern::create
static Expected< GlobPattern > create(StringRef Pat)
Definition: GlobPattern.cpp:108
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::yaml::MappingTraits< IFSStubTriple >::mapping
static void mapping(IO &IO, IFSStubTriple &Stub)
Definition: IFSHandler.cpp:152
llvm::ifs::IFSSymbolType::Func
@ Func
llvm::make_error_code
std::error_code make_error_code(BitcodeError E)
Definition: BitcodeReader.h:271
GlobPattern.h
llvm::yaml::MappingTraits< IFSTarget >::mapping
static void mapping(IO &IO, IFSTarget &Target)
Definition: IFSHandler.cpp:103
llvm::ifs::IFSTarget
Definition: IFSStub.h:64
llvm::ifs::parseTriple
IFSTarget parseTriple(StringRef TripleStr)
Parse llvm triple string into a IFSTarget struct.
Definition: IFSHandler.cpp:294
llvm::createStringError
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
Definition: Error.h:1239
llvm::ifs::IFSStub::Target
IFSTarget Target
Definition: IFSStub.h:93
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::ELF::convertEMachineToArchName
StringRef convertEMachineToArchName(uint16_t EMachine)
Convert an ELF's e_machine value into an architecture name.
Definition: ELF.cpp:204
llvm::ifs::IFSStub::IfsVersion
VersionTuple IfsVersion
Definition: IFSStub.h:91
StringSwitch.h
llvm::ifs::IFSSymbolType::Object
@ Object
llvm::ifs::IFSStub::Symbols
std::vector< IFSSymbol > Symbols
Definition: IFSStub.h:95
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83
llvm::Expected::takeError
Error takeError()
Take ownership of the stored error.
Definition: Error.h:597
llvm::Pattern
Definition: FileCheckImpl.h:614
llvm::ELF::EM_X86_64
@ EM_X86_64
Definition: ELF.h:178
usesTriple
bool usesTriple(StringRef Buf)
Attempt to determine if a Text stub uses target triple.
Definition: IFSHandler.cpp:166
llvm::yaml::MappingTraits< IFSSymbol >::mapping
static void mapping(IO &IO, IFSSymbol &Symbol)
Definition: IFSHandler.cpp:116
llvm::yaml::ScalarTraits< IFSEndiannessType >::mustQuote
static QuotingType mustQuote(StringRef)
Definition: IFSHandler.cpp:70
llvm::yaml::ScalarTraits< IFSBitWidthType >::mustQuote
static QuotingType mustQuote(StringRef)
Definition: IFSHandler.cpp:99
llvm::StringSwitch
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:44
llvm::ELF::EM_AARCH64
@ EM_AARCH64
Definition: ELF.h:280
llvm::ELF::convertArchNameToEMachine
uint16_t convertArchNameToEMachine(StringRef Arch)
Convert an architecture name into ELF's e_machine value.
Definition: ELF.cpp:17
llvm::ifs::IFSTarget::ObjectFormat
Optional< std::string > ObjectFormat
Definition: IFSStub.h:66
llvm::ifs::IFSTarget::Endianness
Optional< IFSEndiannessType > Endianness
Definition: IFSStub.h:69
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::ifs::overrideIFSTarget
Error overrideIFSTarget(IFSStub &Stub, Optional< IFSArch > OverrideArch, Optional< IFSEndiannessType > OverrideEndianness, Optional< IFSBitWidthType > OverrideBitWidth, Optional< std::string > OverrideTriple)
Override the target platform inforation in the text stub.
Definition: IFSHandler.cpp:219