[clang] 9ec5423 - [clang][Interp][NFC] Add documentation for SetLocal

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Mon May 1 21:19:39 PDT 2023


Author: Timm Bäder
Date: 2023-05-02T06:16:49+02:00
New Revision: 9ec5423b90c888d9ec4206c18b728946be5f1368

URL: https://github.com/llvm/llvm-project/commit/9ec5423b90c888d9ec4206c18b728946be5f1368
DIFF: https://github.com/llvm/llvm-project/commit/9ec5423b90c888d9ec4206c18b728946be5f1368.diff

LOG: [clang][Interp][NFC] Add documentation for SetLocal

Added: 
    

Modified: 
    clang/lib/AST/Interp/Interp.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Interp.h b/clang/lib/AST/Interp/Interp.h
index d751ba021b11..2baef4293d51 100644
--- a/clang/lib/AST/Interp/Interp.h
+++ b/clang/lib/AST/Interp/Interp.h
@@ -744,6 +744,9 @@ bool GetLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
   return true;
 }
 
+/// 1) Pops the value from the stack.
+/// 2) Writes the value to the local variable with the
+///    given offset.
 template <PrimType Name, class T = typename PrimConv<Name>::T>
 bool SetLocal(InterpState &S, CodePtr OpPC, uint32_t I) {
   S.Current->setLocal<T>(I, S.Stk.pop<T>());


        


More information about the cfe-commits mailing list