aaron.ballman added inline comments.

================
Comment at: clang/lib/AST/Interp/Function.h:166-168
            llvm::SmallVector<PrimType, 8> &&ParamTypes,
            llvm::DenseMap<unsigned, ParamDescriptor> &&Params,
+           llvm::SmallVector<unsigned, 8> &&ParamOffsets, bool HasThisPointer,
----------------
Nit: this interface should be taking `llvm::SmallVectorImpl<Type>` rather than 
the concrete small vector type.


================
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:22-23
+
+static bool interp__builtin_strcmp(InterpState &S, CodePtr OpPC,
+                                   InterpFrame *Frame) {
+  const Pointer &A = getParam<Pointer>(Frame, 0);
----------------
Thought: it would be nice if we could hoist as much of this implementation as 
we can into a helper function so that we can share most of the guts with 
`__builtin_memcmp()` as well.

Also, it would be good to generalize this so it works for `__builtin_wcscmp()` 
and `__builtin_wmemcmp()` as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149816/new/

https://reviews.llvm.org/D149816

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to