[Sanitizer] Internal Printf string precision argument + padding.

Summary:
Example:
  Printf("%.*s", 5, "123");
should yield:
  '123  '

In case Printf's requested string precision is larger than the string
argument, the resulting string should be padded up to the requested
precision.

For the simplicity sake, implementing right padding only.

Reviewers: eugenis

Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D45844

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330458 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed