MCPcopy Create free account
hub / github.com/ablab/spades / toNullTerminatedStringRef

Method toNullTerminatedStringRef

ext/src/llvm/Twine.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37StringRef Twine::toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const {
38 if (isUnary()) {
39 switch (getLHSKind()) {
40 case CStringKind:
41 // Already null terminated, yay!
42 return StringRef(LHS.cString);
43 case StdStringKind: {
44 const std::string *str = LHS.stdString;
45 return StringRef(str->c_str(), str->size());
46 }
47 default:
48 break;
49 }
50 }
51 toVector(Out);
52 Out.push_back(0);
53 Out.pop_back();
54 return StringRef(Out.data(), Out.size());
55}
56
57void Twine::printOneChild(raw_ostream &OS, Child Ptr,
58 NodeKind Kind) const {

Callers 2

createTemporaryFileFunction · 0.80
to_floatFunction · 0.80

Calls 6

StringRefClass · 0.70
c_strMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
pop_backMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected