This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGeaadbcd5e068: [clang][Interp] Implement __builtin_strcmp
(authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org/D149816?vs=52123
shafik accepted this revision.
shafik added a comment.
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/
shafik added inline comments.
Comment at: clang/test/AST/Interp/builtin-functions.cpp:8
+
+ static_assert(__builtin_strcmp("abab", "abab") == 0);
+ static_assert(__builtin_strcmp("abab", "abba") == -1);
Both empty strings `""` would be good as well.
CHANGES S
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:22-23
+
+static bool interp__builtin_strcmp(InterpState &S, CodePtr OpPC,
+
tbaeder added inline comments.
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(Frame, 0);
aaron.b
aaron.ballman added inline comments.
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(Frame, 0);
t
tbaeder updated this revision to Diff 521239.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149816/new/
https://reviews.llvm.org/D149816
Files:
clang/lib/AST/Interp/ByteCodeEmitter.cpp
clang/lib/AST/Interp/Function.cpp
clang/lib/AST/Interp/Function.h
clang/lib/AST/Interp/Interp.h
tbaeder marked an inline comment as done.
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:22-23
+
+static bool interp__builtin_strcmp(InterpState &S, CodePtr OpPC,
+ InterpFrame *Frame) {
+ const Pointer &A = ge
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/Function.h:166-168
llvm::SmallVector &&ParamTypes,
llvm::DenseMap &&Params,
+ llvm::SmallVector &&ParamOffsets, bool HasThisPointer,
Nit: this interface should
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Make our Function class keep a list of parameter
10 matches
Mail list logo