Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove unnecessary llvm:: qualification. | Eric Christopher | 2014-02-26 | 1 | -2/+2 |
| | | | | llvm-svn: 202316 | ||||
* | Add Twine support for characters, and switch twine to use a union internally | Chris Lattner | 2011-07-24 | 1 | -27/+33 |
| | | | | | | to eliminate some casting. llvm-svn: 135888 | ||||
* | In Twine::str(), if the Twine stores only a std::string, just return a ↵ | Frits van Bommel | 2011-07-15 | 1 | -3/+8 |
| | | | | | | direct copy of that instead of first copying to a SmallString and converting that to a std::string. Also fix some indentation. llvm-svn: 135267 | ||||
* | Support/ADT/Twine: Make toNullTerminatedStringRef not rely on UB :(. | Michael J. Spencer | 2010-12-03 | 1 | -4/+12 |
| | | | | llvm-svn: 120791 | ||||
* | Support/ADT/Twine: Add toNullTerminatedStringRef. | Michael J. Spencer | 2010-12-01 | 1 | -0/+12 |
| | | | | llvm-svn: 120600 | ||||
* | Fix Whitespace. | Michael J. Spencer | 2010-11-26 | 1 | -7/+7 |
| | | | | llvm-svn: 120166 | ||||
* | Implement rdar://7415680 - Twine integer support lacks greatness | Chris Lattner | 2010-05-05 | 1 | -4/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microoptimize Twine's with unsigned and int to not pin their value to the stack. This saves stack space in common cases and allows mem2reg in the caller. A simple example is: void foo(const Twine &); void bar(int x) { foo("xyz: " + Twine(x)); } Before: __Z3bari: subq $40, %rsp movl %edi, 36(%rsp) leaq L_.str3(%rip), %rax leaq 36(%rsp), %rcx leaq 8(%rsp), %rdi movq %rax, 8(%rsp) movq %rcx, 16(%rsp) movb $3, 24(%rsp) movb $7, 25(%rsp) callq __Z3fooRKN4llvm5TwineE addq $40, %rsp ret After: __Z3bari: subq $24, %rsp leaq L_.str3(%rip), %rax movq %rax, (%rsp) movslq %edi, %rax movq %rax, 8(%rsp) movb $3, 16(%rsp) movb $7, 17(%rsp) leaq (%rsp), %rdi callq __Z3fooRKN4llvm5TwineE addq $24, %rsp ret It saves 16 bytes of stack and one instruction in this case. llvm-svn: 103107 | ||||
* | Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the | Benjamin Kramer | 2010-01-13 | 1 | -2/+8 |
| | | | | | | | twine can be represented as a single StringRef. Use the new methode to simplify some twine users. llvm-svn: 93317 | ||||
* | Change errs() to dbgs(). | David Greene | 2010-01-05 | 1 | -2/+3 |
| | | | | llvm-svn: 92640 | ||||
* | Switch Twine::str() to use toVector(), which is now efficient. | Daniel Dunbar | 2009-08-19 | 1 | -14/+4 |
| | | | | llvm-svn: 79437 | ||||
* | Add missing flush(). | Daniel Dunbar | 2009-08-02 | 1 | -0/+3 |
| | | | | llvm-svn: 77859 | ||||
* | Twine: Directly support int, long, and long long types. | Daniel Dunbar | 2009-07-30 | 1 | -17/+29 |
| | | | | | | - This should resolve Cygwin gcc ambiguities. llvm-svn: 77624 | ||||
* | Twine: Use raw_ostream::write_hex, remove unused itohexstr method. | Daniel Dunbar | 2009-07-30 | 1 | -2/+1 |
| | | | | llvm-svn: 77617 | ||||
* | Twine: Provide [u]int{32,64} conversions via implicit constructors instead of | Daniel Dunbar | 2009-07-30 | 1 | -6/+18 |
| | | | | | | explicitly. llvm-svn: 77576 | ||||
* | Twines: Support numeric conversion directly (uitostr, etc). | Daniel Dunbar | 2009-07-29 | 1 | -11/+37 |
| | | | | | | | | | | | | | | | - Provides static constructors for doing number to string conversions without using temporaries. - There are several ways to do this, I think given the Twine constraints this is the simplest one. - One FIXME for fast number -> hex conversion. - Added another comment on one last major bit of perf work Twines need, which is to make raw_svector_ostream more efficient. llvm-svn: 77445 | ||||
* | Add Twine ADT. | Daniel Dunbar | 2009-07-24 | 1 | -0/+91 |
- Not currently used. llvm-svn: 76956 |