[PATCH] Use DiagnosticInfo facility.

Diego Novillo dnovillo at google.com
Fri Mar 14 14:59:24 PDT 2014


On Fri, Mar 14, 2014 at 5:50 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>
>   Hi Diego,
>
>   This overall LGTM with minor changes (see my inline comments).

Thanks for the quick review!

> Comment at: lib/Transforms/Scalar/SampleProfile.cpp:52
> @@ -51,2 +51,3 @@
>  #include "llvm/Support/raw_ostream.h"
> +#include "llvm/IR/DiagnosticInfo.h"
>  #include <cctype>
> ----------------
> Includes should be sorted.

Done.


> ================
> Comment at: lib/Transforms/Scalar/SampleProfile.cpp:97
> @@ -95,3 +96,3 @@
>    static inline unsigned getHashValue(InstructionLocation Val) {
> -    return DenseMapInfo<std::pair<int, unsigned> >::getHashValue(
> +    return DenseMapInfo<std::pair<int, unsigned>>::getHashValue(
>          std::pair<int, unsigned>(Val.LineOffset, Val.Discriminator));
> ----------------
> This shouldn't be part of this patch.
>
> ================
> Comment at: lib/Transforms/Scalar/SampleProfile.cpp:113
> @@ -111,3 +112,3 @@
>  typedef DenseMap<Edge, unsigned> EdgeWeightMap;
> -typedef DenseMap<BasicBlock *, SmallVector<BasicBlock *, 8> > BlockEdgeMap;
> +typedef DenseMap<BasicBlock *, SmallVector<BasicBlock *, 8>> BlockEdgeMap;
>
> ----------------
> Ditto.

Ah, sorry about that. Ran clang-format over the file.  Reverted.

Diego.



More information about the llvm-commits mailing list