Skip to content

Commit

Permalink
Fix a cut-paste-o so that the sample code is correct for my last note.
Browse files Browse the repository at this point in the history
Also, switch to a more clear 'sink' function with its declaration to
avoid any confusion about 'g'. Thanks for the suggestion Frits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123113 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chandlerc committed Jan 9, 2011
1 parent e5ca494 commit 27a2a13
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Target/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2143,7 +2143,8 @@ clang -O3 -fno-exceptions currently compiles this code:

void f(int N) {
std::vector<int> v(N);
g(v);

extern void sink(void*); sink(&v);
}

into
Expand Down Expand Up @@ -2198,7 +2199,10 @@ clang -O3 -fno-exceptions currently compiles this code:

void f(int N) {
std::vector<int> v(N);
g(v);
for (int k = 0; k < N; ++k)
v[k] = 0;

extern void sink(void*); sink(&v);
}

into almost the same as the previous note, but replace its final BB with:
Expand Down

0 comments on commit 27a2a13

Please sign in to comment.