- (parse-defmacro lambda-list whole body name 'defmacro
- :environment environment)
- (let ((def `(lambda (,whole ,environment)
- ,@local-decs
- (block ,name
- ,new-body))))
- `(eval-when (:compile-toplevel :load-toplevel :execute)
- (sb!c::%defmacro ',name #',def ',lambda-list ,doc)))))))
+ (parse-defmacro lambda-list whole body name 'defmacro
+ :environment environment)
+ (let ((def `(#+sb-xc-host lambda
+ ;; Use a named-lambda rather than a lambda so that
+ ;; proper xref information can be stored. Use a
+ ;; list-based name, since otherwise the compiler
+ ;; will momentarily assume that it names a normal
+ ;; function, and report spurious warnings about
+ ;; redefinition a macro as a function, and then
+ ;; vice versa.
+ #-sb-xc-host named-lambda #-sb-xc-host (defmacro ,name)
+ (,whole ,environment)
+ ,@local-decs
+ ,new-body))
+ (debug-name (sb!c::debug-name 'macro-function name)))
+ `(eval-when (:compile-toplevel :load-toplevel :execute)
+ (sb!c::%defmacro ',name #',def ',lambda-list
+ ,doc ',debug-name)))))))