LLVM: lib/TargetParser/SubtargetFeature.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

17#include "llvm/Config/llvm-config.h"

22#include

23#include

24

25using namespace llvm;

26

27

30 S.split(Tmp, ',', -1, false );

31 V.reserve(Tmp.size());

33 V.push_back(std::string(T));

34}

35

43

48

50

51 Split(Features, Initial);

52}

53

55 return join(Features.begin(), Features.end(), ",");

56}

57

59 for (const auto &F : Features)

60 OS << F << " ";

61 OS << "\n";

62}

63

64#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)

68#endif

69

71

72

73

76

79

82 }

83 }

84}

#define LLVM_DUMP_METHOD

Mark debug helper function definitions like dump() that should not be stripped from debug builds.

This file defines the SmallVector class.

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

StringRef - Represent a constant reference to a string, i.e.

std::pair< StringRef, StringRef > split(char Separator) const

Split into two substrings around the first occurrence of a separator character.

static LLVM_ABI void Split(std::vector< std::string > &V, StringRef S)

Splits a string of comma separated items in to a vector of strings.

Definition SubtargetFeature.cpp:28

LLVM_ABI void getDefaultSubtargetFeatures(const Triple &Triple)

Adds the default features for the specified target triple.

Definition SubtargetFeature.cpp:70

static bool hasFlag(StringRef Feature)

Determine if a feature has a flag; '+' or '-'.

LLVM_ABI void print(raw_ostream &OS) const

Prints feature string.

Definition SubtargetFeature.cpp:58

LLVM_ABI std::string getString() const

Returns features as a string.

Definition SubtargetFeature.cpp:54

LLVM_ABI void dump() const

Definition SubtargetFeature.cpp:65

LLVM_ABI SubtargetFeatures(StringRef Initial="")

Definition SubtargetFeature.cpp:49

LLVM_ABI void AddFeature(StringRef String, bool Enable=true)

Adds Features.

Definition SubtargetFeature.cpp:36

LLVM_ABI void addFeaturesVector(const ArrayRef< std::string > OtherFeatures)

Definition SubtargetFeature.cpp:44

Triple - Helper class for working with autoconf configuration names.

ArchType getArch() const

Get the parsed architecture type of this triple.

VendorType getVendor() const

Get the parsed vendor type of this triple.

This class implements an extremely fast bulk output stream that can only output to a stream.

This is an optimization pass for GlobalISel generic memory operations.

void append_range(Container &C, Range &&R)

Wrapper function to append range R to container C.

LLVM_ABI raw_ostream & dbgs()

dbgs() - This returns a reference to a raw_ostream for debugging messages.

std::string join(IteratorT Begin, IteratorT End, StringRef Separator)

Joins the strings in the range [Begin, End), adding Separator between the elements.